Hi,
I have 3 files, one(SpiderSiteTest.java) with the main method calling a
test suite Object. The test suite is SpiderPageSuite, the only thing it
does is an empty addTest and create one Test object and run it. The test
Obect (SpiderPageTest) implements run(TestResult result), not doing
anything inside.
When I run manually the main method of SpiderSiteTest, as expected, the
result is:
Time: 0,003
OK (1 test)
But when I do mvn test the result is:
-------------------------------------------------------
T E S T S
-------------------------------------------------------
There are no test to run.
Results :
[surefire] Tests run: 0, Failures: 0, Errors: 0
How can I tell surefire that a testSuite is waiting for it?
my files are at the end of the mail.
thanks for any help,
alex
-------------------------------------------------------------------------------------------------------
public class SpiderPageTest implements Test {
private final String fName;
public SpiderPageTest(String name) {
fName= name;
}
public int countTestCases() {
return 1;
}
public void run(TestResult result) {
result.startTest(this);
try {
//do nothing
}
catch (AssertionFailedError e) { //1
result.addFailure(this, e);
}
catch (Throwable e) { // 2
result.addError(this, e);
}
}
}
--------------------------------------------------------------------------------------------------------
public class SpiderSiteTest {
public SpiderSiteTest() {
super();
}
public static Test suite() throws MalformedURLException,
IOException,SAXException {
SpiderPageSuite spiderSuite = new SpiderPageSuite();
TestSuite suite = new TestSuite();
suite.addTest(spiderSuite);
return suite;
}
public static void main(String[] args) throws
MalformedURLException,IOException, SAXException {
TestRunner.run(suite());
}
}
-------------------------------------------------------------------------------------------------------
public class SpiderPageSuite implements Test {
public final int countTestCases() {
return 1;
}
public void run(TestResult result) {
SpiderPageTest pageTest = new SpiderPageTest("my test");
pageTest.run(result);
}
public void addTest(Test test) {
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]