I am trying to switch to SeleniumTestCase for testing and I'm running into a
few things that seem odd. Here is what I currently understand has to happen to
get this working:
1. testng.xml must configure the package containing the tests and
SeleniumLauncher
2. The test class must extend SeleniumTestCase
3. The tests have to be run as a suite. (Calling mvn test should do this).
A simple project with a single test gives the following error:
-------------------------------------------------------------------------------
Test set: TestSuite
-------------------------------------------------------------------------------
Tests run: 4, Failures: 1, Errors: 0, Skipped: 3, Time elapsed: 1.443 sec <<<
FAILURE!
indicateTestMethodName(test.integration.DemoTest) Time elapsed: 0 sec <<<
FAILURE!
java.lang.NullPointerException
at
org.apache.tapestry5.test.SeleniumTestCase.indicateTestMethodName(SeleniumTestCase.java:97)
It looks like the delegate object in SeleniumTestCase is null, but I'm not sure
how to create it other than configuring testng.xml. Also I don't understand
why I'm seeing 4 tests instead of just the one I created. (Unless setup
methods inherited from SeleniumTestCase will count toward tests).
Any suggestions?
Jack
Here is the testng.xml file just in case I'm overlooking something silly in it:
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="tapestrydemo Application Test Suite" annotations="1.5">
<test name="Unit Tests">
<packages>
<package name="test.integration"/>
</packages>
<classes>
<class name="org.apache.tapestry5.test.SeleniumLauncher"/>
</classes>
</test>
</suite>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]