2014-11-06 23 views
0

我們執行使用黃瓜與Maven在eclipse不同功能的文件不同的測試場景執行測試用例。硒:如何在平行使用黃瓜與Maven

EX:

FeatureFile1:Login1

Scenario:UserLogin 

Given:the userName is "aaa" 

When:the login button is clicked 

Then:the user login as successfully 

FeatureFile2:Login2身份

Scenario:UserLogin01 

Given:the userName is "bbb" 

When:the login button is clicked 

Then:the user login as successfully 

在上面的例子中如何在平行和ALS 運行o如何配置pom.xml文件

問候,

戈帕爾

回答

0

我不知道如何只使用maven來解決它。我正在使用jbehave並與testng並行運行測試。它提供了運行測試運行的xml,並且您可以指定並行線程的數量以及並行線程的數量(metod,tests,suit)。在構建服務器上使用maven命令:

mvn test -Dtestng.xml.file=suite.xml 

此外,您可以使用surefire插件與任何測試提供程序。 http://testng.org/doc/index.html http://maven.apache.org/surefire/maven-surefire-plugin/index.html