Ant Selenium Mesh with Serial Parallel Ant Execution

I am trying to run selenium tests with a selenium grid 2. My tests are more dependent. I have to well define my sequential launch and parallel launch. Attach the build.xml file for the link. Inside a serial node, I have many parallel nodes with different goals. There are inconsistency issues before running this build.xml.

Several times it raises the goals of the second parallel node, and sometimes not. He also gives no errors. I tried to run the ant command in verbose mode, still not getting the ant exception.

I will be glad if someone helps in this regard.

<target name="startServerRC" depends="startServerhub"> <echo>Starting Selenium Server...</echo> <java jar="${lib.dir}/selenium-server-standalone.jar" fork="true" spawn="true"> <arg line="-port 5555"/> <arg line="-log log.txt"/> <arg line="-firefoxProfileTemplate"/> <arg value="${lib.dir}/ff_profile"/> <arg line="-userExtensions"/> <arg value="${lib.dir}/user-extensions.js"/> <arg line="-role node"/> <arg line="-hub http://localhost:4444/grid/register "/> <arg line="-maxSession 10"/> <arg line="-maxInstances=10"/> </java> </target> <!-- Initialization --> <target name="init" depends="startServerRC" > <echo>Initlizing...</echo> <delete dir="${classes.dir}" /> <mkdir dir="${classes.dir}"/> </target> <!-- Complies the java files --> <target name="compile" depends="init"> <echo>Compiling...</echo> <javac debug="true" srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath" /> </target> <target name="CItarget"> <sequential> <antcall target="compile"/> <parallel> <antcall target="run"/> <antcall target="run_PSDATA"/> </parallel> <parallel> <antcall target="run_PreData"/> <antcall target="run_DFPPulls"/> <antcall target="run_AdTechPulls"/> <antcall target="run_AppnexusPulls"/> <antcall target="run_FTPPulls"/> <antcall target="run_OASPulls"/> <antcall target="run_GDFPPulls"/> <antcall target="run_FreewheelPulls"/> <antcall target="run_ThirdPartyPulls"/> </parallel> <parallel> <antcall target="run_PostData"/> <antcall target="run_Sales"/> </parallel> <parallel> <antcall target="run_Administration"/> <antcall target="run_E2EPartner360"/> <antcall target="run_Sales"/> <antcall target="run_Finance"/> <antcall target="run_Loaders"/> <antcall target="run_Accounts"/> <antcall target="run_Adops"/> </parallel> <parallel> <antcall target="run_Alerts"/> <antcall target="run_CustomFields"/> </parallel> <antcall target="stop-selenium"/> </sequential> </target> 

Thanks in advance Anjana

+6
source share
2 answers

Try QAF (formerly ISFW) , where you can run validation in parallel with / without using a grid. In your case, the following configuration file may fulfill your requirement:

 <suite name="Sample Test Automation" verbose="0" parallel="tests"> <test name="Set1" > <parameter name="selenium.server" value="server1"/> <parameter name="selenium.port" value="port"/> <!-- group or class or package entry as per testNG standard --> <classes> <class name="qualified name of class"></class> </classes>> </test> <test name="set2" > <parameter name="selenium.server" value="server2"/> <parameter name="selenium.port" value="port"/> <!-- <packages> <package name="package name" /> </packages> --> <classes> <class name="qualified name of class"></class> </classes> </test> </suite> 
+1
source

It is better to use tesng or junit for parallel testing of the manager instead of doing it directly in Build.xml.

here is a good tutorial on setting up testng, Ant and selenium mesh:

http://technologyandleadership.com/six-steps-for-complete-test-automation-with-selenium-grid/

0
source

Source: https://habr.com/ru/post/912734/


All Articles