user6219476
user6219476

Reputation: 89

Testng on IntelliJ no output after tests are ignored

Is there a way to get the cause of the tests being ignored when Testng ignores the tests?

In the console, after a long list of names of the files built with no result stated, then all I can see is:

[TestNG] Running:
  /Users/user1/Library/Caches/IntelliJIdea2018.1/temp-testng-customsuite.xml

Test ignored.

Test ignored.

Test ignored.

===============================================
Default Suite
Total tests run: 3, Failures: 0, Skips: 3
===============================================


Process finished with exit code 0

From what I learned, it can be any runtime error. Like IllegalArgumentException etc.

As long as it's during building process, no error message will be displayed.

Is there a more effective way to debug with the missing log?

Upvotes: 0

Views: 1443

Answers (2)

Jocke
Jocke

Reputation: 2294

Then add a Assert.Ignore("message_here"); to your test code... but ignoring tests is a bad practice. And test SHOULD fail and stop the execution on unexpected exceptions!

Upvotes: 1

Niranjan Kumar
Niranjan Kumar

Reputation: 1518

The default configfailurepolicy for testng is skip, i.e if any test fails in suite it will skip the remaining.

If you want your tests to run even after failing previous tests the add below attribute in <suite> tag of temp-testng-customsuite.xml

<suite name="Suite" parallel="tests" thread-count="10" verbose="10" configfailurepolicy="continue">

Upvotes: 0

Related Questions