Maven正在运行测试随机数次

时间:2015-07-25 08:22:54

标签: maven selenium grid testng xvfb

我对maven有问题。我开始在网格中使用Maven TestNG。我在xml文件中将thread-count设置为10,Maven运行测试14次。我不明白为什么会这样。下面是粘贴配置。

http://pastebin.com/JYLL5ZJt

在我的文件树下面:

http://pastebin.com/aVFFaNng

我正在使用xvfb浏览器进行测试。我这样开始玩:

java -jar selenium-server-standalone-2.46.0.jar -role hub

节点:

xvfb-run -a java -jar selenium-server-standalone-2.46.0.jar -role node -port 5454 -browser browserName=firefox -hub http://localhost:4444/grid/register

在10节点上启动mvn test我得到下一个输出:

Caused by: org.openqa.selenium.WebDriverException: Unable to bind to locking port 7054 within 45000 ms

Results :

Failed tests: 
  AccountTabTime>Base.setUp:35 » WebDriver Unable to bind to locking port 7054 w...
testNG.Parallel.CheckInvoice.setUp(testNG.Parallel.CheckInvoice)
  Run 1: CheckInvoice>Base.setUp:35 » WebDriver Unable to bind to locking port 7054 wit...
  Run 2: CheckInvoice>Base.setUp:35 » WebDriver Unable to bind to locking port 7054 wit...

  OrderProducts>Base.setUp:35 » WebDriver Unable to bind to locking port 7054 wi...
  ProductsAndServices>Base.setUp:35 » WebDriver Unable to bind to locking port 7...
  RegisterIncident>Base.setUp:35 » WebDriver Unable to bind to locking port 7054...

Tests run: 15, Failures: 5, Errors: 0, Skipped: 6

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:32.217s
[INFO] Finished at: Sat Jul 25 09:46:57 CEST 2015
[INFO] Final Memory: 9M/115M

当我在1个节点上运行mvn test时,我得到: 结果:

Tests run: 10, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4:35.527s
[INFO] Finished at: Sat Jul 25 10:01:31 CEST 2015
[INFO] Final Memory: 12M/134M

所以我的问题是:为什么一个节点都工作正常,10个节点maven运行超过10个测试?我怎么能解决这个问题?

0 个答案:

没有答案