No More Missing TestNG Tests

I often forget to add newly created tests to the testng.xml, which is used in our TeamCity build, and by the time I realize that they don’t run something is surely went wrong. What a bummer! Not any more, fortunately — IntelliJ IDEA makes sure no tests are missing. All it takes is to enable the Undeclared test inspection under TestNG in the Errors section of the Settings dialog.
Undeclared Test Warning

This entry was posted in New Features and tagged , , . Bookmark the permalink.

2 Responses to No More Missing TestNG Tests

  1. nodje says:

    It seems that my test are all undeclared.
    When I use the inspection it’s asking me for my testng.xml.
    But how can I specify which testng.xml the inspection should use as reference?


  2. Anna Kozlova says:

    It searches for any occurrences of your test in an xml file which looks like testng.xml. So, if all your tests are declared via factories then they will be shown as undeclared.

Leave a Reply

Your email address will not be published. Required fields are marked *