Is there a way to use a custom JUnit Test Runner when running tests in Eclipse?

I want to use JMockit incremental test runner instead of the standard JUnit test runners from Eclipse. Is there any way to do this?

Change Got the following response to my email address to the JMockit developer:

You will need to start the JVM using the command line, such as "-javaagent: jmockit.jar = incjunit4", where "incjunit4" indicates that the external tool for incremental JUnit tests are loading. The coverage tool should also be used because it provides the necessary runtime information for the incremental test tool. In fact, there is no documentation about this, mainly because this function is not fully developed.

Unfortunately, this still does not work for me. Has anyone got an incremental test runner to work?

+4
source share
2 answers

it worked for me, you need to run a regular test, and then run Run and the properties of this test and enter the value with the jmockit patch (path to jar)

+1
source

Can't you use the @RunWith annotation?

+1
source

All Articles