Is there a good tool out there to automatically generate jUnit test cases based on some primitive template? This is so that test cases can be written by engineers who do not have a lot of Java or jUnit background. As background information, this is for black box testing. If there is some other alternative to run regression tests than using jUnit, I would also appreciate hearing about it.
Thx
Creating a JUnit Test Case in EclipseTo use JUnit you must create a separate . java file in your project that will test one of your existing classes. In the Package Explorer area on the left side of the Eclipse window, right-click the class you want to test and click New → JUnit Test Case.
To record the test case, click on the TestCase Studio icon on the toolbar. Now keep performing your steps, it will automatically record all the user actions. You can save the recorded steps by clicking on the Download Test Case button.
Right-click the test root folder or package in the test root folder in which you want to create a new test and select New | Java Class. Name the new class and press Enter . Press Alt+Insert and select Test Method to generate a new test method for this class.
Besides manual testing, JUnit is preferred equally for automation testing. It can also be used along with the Selenium WebDriver to automate tests for web applications. It provides a unique way to write structured, short, and better test cases.
Parasoft's JTest is a commercial tool but it is quite good for:
For a free solution you can try the JUnit generation functionality of the CodePro Analytix Eclipse plugin.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With