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

Comments below can no longer be edited.

2 Responses to No More Missing TestNG Tests

  1. Avatar

    nodje says:

    March 27, 2009

    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. Avatar

    Anna Kozlova says:

    March 27, 2009

    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.

Discover more