I have been adding a steady amount of improvements to the TestNG Eclipse plug-ins over the past weeks, so I thought I’d stop for a minute and put together a quick summary of the upcoming features.
The first improvement is the appearance of the tree. You will notice that it now mirrors faithfully the hierarchy that is found in testng.xml: Suites, Tests, Classes and then Methods. Failures are captured in the “Failed Tests” tab for easier look up:
This tab allows you to focus on the tests that fail and ignore all those that passed.
Another new feature is the Search box. When you have hundreds of tests running, finding a specific one is not always easy, so you can now type a few letters of the test method or its parameters and the content of the tree will automatically narrow down to methods matching your search. Note in the screen shot above that the search also works on parameters provided by @DataProvider.
There is now a new tab called “Summary”. This tab gives you statistics on your test run, such as the timings, the test names, the number of methods and classes, etc… Since the results are shown in a table, you can also sort on any criterion you like for easier parsing. This is especially handy when you are trying to determine what tests take the longest time.
Of course, the search box works in this view as well, and note that in the screen shot below, the Time column is sorted in decreasing order:
This view is still a work in the progress and I’m planning to add more information there in the future, such as statistics on individual classes, time line, etc… Let me know if you have suggestions.
Better conversions from JUnit 3
I also improved the automatic conversion of JUnit tests and added support for JUnit 4 conversions. The screen shot above shows how deep the JUnit 3 quick fix now goes. Notice that your code is now correctly updated so that the converted file will compile without additional changes on your part.
… and JUnit 4
When I started writing the conversion fixes, I made support JUnit 4 a non-goal since I was under the impression that developers would be converting from JUnit 3 but that JUnit 4 users would probably not see the need to convert to TestNG.
Well, I was wrong, and since I started receiving requests from JUnit 4 users to help them convert over to TestNG, I went ahead and added quick fixes for JUnit 4 classes. The screen shot above illustrates this.
There are also a lot of other more subtle changes, but I’ll stop here. With these improvements, I’m hoping that the TestNG Eclipse plug-in will become even more appealing as the central hub for all your testing needs.
I will be pushing these new features to the update site very soon.