Maven Surefire

Surefire + TestNG executes tests annotated as disabled, if superclasses are enabled.

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 2.4.3, 2.5
  • Fix Version/s: None
  • Component/s: TestNG support
  • Labels:
    None
  • Environment:
    TestNG 5.11, Maven 2.2.1, Apple & Sun JDK 6
  • Complexity:
    Intermediate
  • Number of attachments :
    0

Description

This has to do with a test class extending a base test class, and both classes are annotated with @Test. The parent class would have @Test (enabled = true) and the child @Test (enabled = false). The child test is still run, and this is contradictory to the behaviour of TestNG run in other forms (command line, via IDEs, etc).

I suspect this has to do with the way @Test annotations are parsed by Surefire when deciding which classes to pass to TestNG.

Activity

Hide
Oliver B. Fischer added a comment -

I have a similar problem with disabled test classes inheriting from org.jboss.arquillian.testng.Arquillian.

It is not possible to disable this tests in our setup.

Show
Oliver B. Fischer added a comment - I have a similar problem with disabled test classes inheriting from org.jboss.arquillian.testng.Arquillian. It is not possible to disable this tests in our setup.

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated: