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

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -