junit3 and the JUNIT4 the use of the difference is as follows
1. the TestCase class needs to be inherited in JUnit3, but no inheritance is required in JUNIT4 testcase
2. in JUnit3, you need to overwrite the setup and Teardown methods in the TestCase, where the Setup method is called to complete initialization before the test executes, and the Teardown method is invoked when the test results are closed. Used to release the resources in the test use, and in JUNIT4, you only need to add @before before the method, @After
3. when testing a method in JUnit3, the command for the test method is fixed, for example, to test the Addbook method, to write a test method named Testaddbook, and there is no constraint on the method command in JUNIT4. Add @test to the front of the method, which means that this method is the test method in the test case
4. New Assertion Assertthat
5. @BeforeClass and @AfterClass. In JUnit3, if all test case is called only once Setup () and teardown () need to use the Testsetup class
6. Test exception Handling @test (expected = dataformatexception.class)
7. Set timeout @test (timeout = 1000)
8. Ignore Test @ignore
9. Integration Testing
The difference between-JUNIT3 and 4 of the Basic Learning of JUnit (4)