The @Test(enable = false) annotation argument

Both JUnit and TestNG can disable tests. While JUnit uses a separate @Ignore annotation, TestNG uses the @Test annotation Boolean argument, enable. Functionally, both work in the same way and the difference is only in the way we write them.

Get Test-Driven Java Development - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.