I am trying to run a simple test with the Tests Selector Plugin for Jenkins. I followed the tutorial in the wiki.
When I am going to build, I get this tree (which looks ok)
My config file is this one:
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
And my test class is this:
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);
}
}
}
However, when I press "Build" I get the following error:
[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]
What am I doing wrong?