IntelliJ 15 gets released with improved UI for testing

Idea just released a major update to their IntelliJ IDE, which contains loads of fixes, enhancements and new features. The UI improvements on the testing side are quite interesting and useful (as they specify on their blog, this part has been completed rewritten, resulting in a much smoother and better working UI). Some examples of the interesting features this upgrade brings are presented below (for running TestNG tests):

  • in the test class editor you have the ‘Run’ icons embedded on the left side (next to the test editor window), to be able to run the tests in the class (the methods with the @Test annotation) directly from the editor window (instead of first selecting the class in the left side navigation, right clicking it and selecting ‘run’).

runIcon

  • the ‘Run’ window now shows the duration of each test method’s run, and the aggregated duration per class and suite.

duration

  • near the progress bar, after the tests have finished running, the number of total, failed and skipped tests is displayed, together with the total duration of running.

totalRun

  • you have some icons that you can select/deselect in order to see passed tests and skipped tests. Unselecting both options will lead to the display of only the failing tests

selectDeselect

  • when running tests that are assigned DataProviders, you will now see more information in the ‘Run’ window: apart from the values that are passed into the test method at each run, a number is displayd, which corresponds to: the position in the DataProvider of the object the test runs with  + 1 (if the test is running with the third item from the provider, for example, the number 2 is displayed).

dataProviderValue

  • also, when running tests with data providers, and some tests are failing, you can choose to rerun them. The improvement on this topic is that now, instead of running the failing test method with ALL data provider values (including those for which the test passed), the test will run only with the values that cause failures. There is however a side effect to this feature (coupled with one above, that displays the number corresponding to the position on the data provider of the parameters passed into the test + 1): at the first rerun of failed tests, the numbers displayed next to each run is reset (they start from 1 to N, and they are consecutive). If some of these tests pass, and you would want to rerun only the failing tests from this batch, due to the “renumbering”, the wrong tests will be run (in this last run, since the number is reassigned, the value corresponding to this number in the initial dataProvider will be used; so for example at the latest rerun, the failing test has the number 3 attached, even though initially, at the first run it had let’s say 10 – if you choose to rerun, the parameter from the initial dataProvider at the position 4 will be used instead of the one you are rerunning for).
  • Also a limitation with this new version is that apparently if the dataProvider has way too many entries, the test will simply not run. It will just hang without any sort of indication of what and where is blocked.

The full list of released features can be found here: https://www.jetbrains.com/idea/whatsnew/.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s