6

セレングリッド2を設定してセレンテストを実行しようとしています。私のテストはもっと依存しています。シーケンシャルランとパラレルランを明確に定義する必要があります。ref用にbuild.xmlファイルを添付します。シーケンシャルノード内には、ターゲットが異なる多数の並列ノードがあります。このbuild.xmlを実行する際に不整合の問題に直面しています。

2度線のターゲットをピックアップする場合もあれば、そうでない場合もあります。エラーも出ていません。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>

よろしくお願いします
Anjana

4

2 に答える 2

1

グリッドを使用して/使用せずにテストを並行して実行できる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>
于 2013-02-12T14:49:07.170 に答える
0

Build.xml で直接実行するのではなく、tesng または junit を使用して並列テストを管理する方がはるかに優れています。

これは、testng、Ant、およびセレン グリッドの構成に関する優れたチュートリアルです。

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

于 2013-11-08T11:25:30.987 に答える