我正在尝试使用Jenkins的Tests Selector Plugin运行一个简单的测试。我跟着tutorial in the wiki。
当我要建造时,我得到这棵树(看起来不错)
我的配置文件就是这个:
tests=[{"enabled":true,"owner":"saul","testgroup":"A","testcase":"NewTest.testJenkinsWebsite"},{"enabled":true,"owner":"saul","testgroup":"B","testcase":"NewTest.testJenkinsWebsiteAgain"}]
enableField=enabled
groupBy=testgroup
fieldSeparator=.
showFields=testsuite,testcase
multiplicityField=multiplicity
我的测试类是这样的:
public class NewTest {
private WebDriver driver;
private String baseUrl;
private boolean acceptNextAlert = true;
private StringBuffer verificationErrors = new StringBuffer();
@Before
public void setUp() throws Exception {
// Usual Code here
}
@Test
public void testJenkinsWebsite() throws Exception {
// Some test here
}
@Test
public void testJenkinsWebsiteAgain() throws Exception {
// Other test here
}
@After
public void tearDown() throws Exception {
driver.quit();
String verificationErrorString = verificationErrors.toString();
if (!"".equals(verificationErrorString)) {
fail(verificationErrorString);
}
}
}
然而,当我按下“Build”时,我收到以下错误:
[JENKINS] Recording test results
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.858s
[INFO] Finished at: Mon Jun 08 17:44:27 UTC 2015
[INFO] Final Memory: 17M/41M
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test (default-test) on project SampleSeleniumGrid: No tests were executed! (Set -DfailIfNoTests=false to ignore this error.) -> [Help 1]
我做错了什么?