My favorites | Sign in
Project Home
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 44: Plug-in Doesn't Find Superclass Tests
3 people starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


 
Reported by rjlori...@gmail.com, Mar 18, 2009
What steps will reproduce the problem?
1. Create an abstract class with test annotations:
public abstract class AbstractTestHarness {
  @Test
  public void testSomething() {
    assert "Test" == getValue();
  }
  public abstract String getValue();
}
2. Create a sub-class with no annotations that supplies the concrete value:
public class MyTest extends AbstractTestHarness {
  public String getValue() {
    return "Test";
  }
}
3. Try to run 'MyTest'. via 'Run As...'

What is the expected output? What do you see instead?
The test class will be exercised by TestNG, but will not actually find any
tests. If you try to run it again, the TestNG context item will no longer
appear under the 'Run As...' menu.

Note that if I do the same thing with a testng.xml pointing to the MyTest
class, it finds the super-class test.

What version of the product are you using? On what operating system?
Eclipse Ganymede SR2 (3.4.2)
TestNG Plug-in 5.8.0.2 (latest from update site)

Please provide any additional information below.
<none>


Powered by Google Project Hosting