java - Upgrading to JUnit4 and keeping legacy JUnit 3 tests and test suites by running them together -


I could not find the answer yet. If I miss something fundamental then I will be happy to know this.

There is a large heritage code base that was upgraded to Java 6 (1.4). A large number of June Unit 3 tests are present in the code and it is arranged in the test suite which runs successfully in Eclipse with the Juynet 4 default runner.

Now, I'm adding new tests that are not pure Genuine 4 tests (annotations, no tests, etc.). What is a way to run both the old Juniott 3 trial suite and the new Geunit 4 tests together? Will happen?

Simply use the 'JUnit4' test runner in your run configuration.

JUnit4 Binaries have a backward compatibility layer which allows both JUnit3 and JUnit4 style sections in the same test suite.

The JUnit4 Jar is used instead of JUnit3 from the command line.

This was done specifically to reduce the migration that you are now doing.

In addition, it works fine in my project.


Comments

Popular posts from this blog

Is there an open source WebSockets (JavaScript) XMPP library? -

java - Is there an object like a "Set" that can contain only unique string values, but also contain a count on the number of occurrences of the string value? -

iphone - How do I make a UIPickerView in a UIActionSheet -