I have a JUnit test with an @Ignore attribute, for example -
public class HealthCareGov
{
@Test
@Ignore
public void performancetest()
{
// stuff
}
}
In most IDEs (IntelliJ for example) I can forcefully run this test by selecting the method name even though there is an @Ignore attribute. I'm guessing Eclipse also allows this?
However, when I try to do the same behavior in Maven by executing the following -
mvn -Dtest=HealthCareGov#performancetest test
It appears that Maven skips the test. This is the output -
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running HealthCareGov
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.032 sec
Results :
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1
What Maven command line can I use to force the execution of this test to reproduce the behavior that my IDE produces? Modifying the Java source code is not an option.