cbeust/testng — Issue #151: @Test(enabled=false) annotation at class level should disable all the methods in the class
Author: nithril
Created: 2011-12-21 12:25:36+00:00
State: open

Copied from http://code.google.com/p/testng/issues/detail?id=102

Tested with TestNG 6.3.1 too

**What steps will reproduce the problem?**
I have a test class like this:

@Test(enabled = false)
public class MyTest {
@DataProvider(name = "bla")
private Object[][] bla() {
return new Object[][] {
new Object[] { "bla"}
};
}

@Test(dataProvider = "bla")
public void blatest(String bla) {
System.out.println(bla);
}
}

**What is the expected output? What do you see instead?**
I would expect method blatest not to run and no console output. Instead blatest runs and prints "bla".

**What version of the product are you using? On what operating system?**
I've tested with testng 5.11/6.0.1, running from maven 2.2.1/3.0.3 with surefire plugin 2.7.2.

**Please provide any additional information below.**