I have 3 test NG files.
(我有3个测试NG文件。)
Machine1.xml: (Machine1.xml:)
<suite name="Machine1" verbose="1" parallel="tests" thread-count="1">
<test name="LoginTest">
<classes>
<class name="test.app.home.LoginTest"/>
</classes>
</test>
</suite>
Machine2.xml
(Machine2.xml)
<suite name="Machine2" verbose="1" parallel="tests" thread-count="1">
<test name="LoginTest">
<classes>
<class name="test.app.home.LoginTest"/>
</classes>
</test>
</suite>
MachineMain.xml
(MachineMain.xml)
<suite name="testng" verbose="1" parallel="tests" thread-count="2">
<tests>
<test name="Machine1">
<suite-files>
<suite-file path="Machine1.xml"/>
</suite-files>
</test>
<test name="Machine2">
<suite-files>
<suite-file path="Machine2.xml"/>
</suite-files>
</test>
</tests>
</suite>
Note: I am running the MachineMain.xml through eclipse.
(注意:我正在通过Eclipse运行MachineMain.xml。)
I have written the code to open the remoteWebDriver inside setup method and i have @BeforeSuite annotation just above the setup method. (我已经编写了在设置方法内部打开remoteWebDriver的代码,并且在设置方法上方有@BeforeSuite批注。)
What i am trying: I have a hub and 2 nodes, both the nodes have maxInstance as 1. I am trying to run the 2 xml - Machine1.xml and Machine2.xml (Suites) in parallel by opening one browser in each node - Basically Machine1.xml suite in one node (Machine 1) and Machine2.xml suite in the other node (Machine 2).
(我正在尝试的是:我有一个集线器和2个节点,两个节点的maxInstance均为1。我试图通过在每个节点中打开一个浏览器来并行运行2个xml-Machine1.xml和Machine2.xml(Suites)-基本上,一个节点(机器1)中的Machine1.xml套件,另一节点(机器2)中的Machine2.xml套件。)
What is happeing: The hub sends first Machine1.xml request to one Node (Machine 1) and after it finishes the execution, the second Machine2.xml is picked and sent to second Node (Machine 2).
(发生了什么:集线器将第一个Machine1.xml请求发送到一个节点(机器1),并在完成执行后,将第二个Machine2.xml拾取并发送到第二个节点(机器2)。)
I was expecting that since i have specifed 'suite-file' inside 'test' tag and specified "parallel" value to 'tests' and "thread-count" value to 2 in MachineMain.xml, it would automatically execute the suites in parallel.
(我期待着,因为我已经在'test'标记中指定了'suite-file',并且在MachineMain.xml中将“ parallel”值指定为'tests'并且将“ thread-count”值指定为2,所以它将自动并行执行套件。)
Please help me resolve the issue.
(请帮助我解决问题。)
ask by user2356679 translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…