Bug in TestNG-J 0.1.17 ?
Hello,
since I upgraded the plugin to 0.1.17 my tests do not work any more. I have a class which inherits from another class with a setup method.
Example:
class Setup:
package cdn.test.setup;
public class SetUp
{
public SetUp()
{
}
/**
this is the suites common setUp-method
*
@testng.configuration beforeSuite = "true"
*/
protected void setUp()
{
System.out.println("Set up tests");
}
}
class DummyTest
package cdn.test.inherit;
import cdn.test.setup.SetUp;
public class DummyTest extends SetUp
{
public DummyTest()
{
}
/**
@testng.test
*/
public void testNavigationController()
{
System.out.println("Execute test");
}
}
And a strange output "unknown stack trace" can be seen.
Is this a bug in the new version?
Thanks and best regards, Martin
请先登录再写评论。
Martin Preis wrote on 01/02/06 23:40:
Mmmm interesting - I'll take a look at this tonight when I get home.
How have you got the run profile setup? class, package, group?
Mark
Martin Preis wrote on 01/02/06 23:40:
I don't see any problems with this setup under JDK5 annotations, but I o
see an exception when using the javadoc style which seems to be a bug in
testng itself which I'm just looking at - the stacktrace I saw had a
NullPointerException in it. I've patched my TestNG to fix this but
under both setups I don't see the setup method run - did this work
before? Along with the minor fixes to the plugin I had updated the
version of TestNG used, I'll ping Cedric and see if theres a problem
with superclasses....
Sorry! I found out that the problem only occurs if the SetUp class inherits from JUnit TestCase.
If I use TestNG over command line the same problem occurs.
It is not a problem of the plug in.
Thanks, Martin
Martin Preis wrote on 02/02/06 21:39:
Sweet - well I found the NPE anyway ;)