Sahi Pro can distribute and run tests on multiple machines (nodes)
drun.bat and drun.sh
Open sahi_pro/userdata/bin/drun.bat (drun.sh on linux) using any editor and configure the NODES variable to contain all the machines on which the tests should run.
E.g. –
On windows,
SET NODES=localhost:9999,machine2:9999,machine3:9999
On linux,
export NODES=localhost:9999,machine2:9999,machine3:9999
C:\sahi_pro\userdata\bin>drun.bat--
Usage: drun.bat <sah file|suite file> <startURL> <browserType> <tags>
File path is relative to userdata/scripts
tags are used only if the input suite is a csv file
--
Example:
drun.bat demo/demo.suite http://sahi.co.in/demo/ firefox
drun.bat demo/sahi_demo.sah http://sahi.co.in/demo/ ie
drun.bat demo/testcases/testcases_sample.csv http://sahi.co.in/demo/ ie
"(user||admin)&&medium"
--To run your suite, use
cd sahi_pro\userdata\bin
drun.bat demo/demo.suite http://sahi.co.in/demo/ firefox
<taskdef name="sahid"
classname="in.co.sahi.ant.DAntRunner"
classpath="lib/ant-sahi.jar" />
<target name="drun">
<tstamp>
<format property="ts" pattern="yyyy_MM_dd_HH_mm_ss" locale="en, IN" />
</tstamp>
<property name="tempdest" value="scritps/${ts}" />
<sahid suite="${tempdest}/demo/demo.suite"
baseurl="http://${urlbase}/demo/"
sahihost="localhost"
sahiport="9999"
failureproperty="sahi.failed"
haltonfailure="false"
browserType="firefox">
<sync originFolder="userdata/scripts" destFolder="${tempdest}"
ignorePattern=".*(svn|copied).*" />
<node host="localhost" port="9999" />
<node host="machine1" port="9999" />
<node host="machine2" port="9999" />
</sahid>
<antcall target="failsahi" />
</target>