Anj*_*ana 6 ant parallel-processing selenium selenium-grid
我正在尝试用selenium grid 2设置运行selenium测试.我的测试更依赖.我必须很好地定义我的顺序运行和并行运行.附加我的build.xml文件以供ref.在顺序节点内部,我有许多具有不同目标的并行节点.我在运行此build.xml时遇到了不一致的问题.
有时它会选择第二个并行节点的目标,有时则不会.它也没有给出错误.我尝试在详细模式下运行ant命令,仍然没有获得ant异常.
如果有人在这方面提供帮助,将会很高兴.
<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>
Run Code Online (Sandbox Code Playgroud)
在此先感谢
Anjana
尝试QAF(以前称为 ISFW),您可以在使用/不使用网格的情况下并行运行测试。在您的情况下,以下配置文件可以满足您的要求:
<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>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1395 次 |
| 最近记录: |