Migrating from JUnit
Using Eclipse
The easiest way to convert your JUnit tests to TestNG is to use the Eclipse TestNG plug-in refactoring support. You will find a full description of its features in the Eclipse section.
Asserts
Note that the class org.testng.Assert uses a different argument ordering than the ones used by JUnit. If you are porting code that uses JUnit's asserts, you might want to us a static import of that class:
import static org.testng.AssertJUnit.*;
Related reading
Here is the detailed report of a company that successfully converted a large codebase of JUnit 4 tests over to TestNG.