-
Hi, I wonder if it has something to do with the way TestNG report generation works with Gradle build tool? I am not sure whether this issue is happening because of TestNG or Gradle. Here is a link to my post on Gradle discussion form where you can find more details: Could you please take a look and suggest what could possibly be causing this issue? and suggest the right approach to make sure that TestNG reports will always be generated after gradle build finishes. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
@itkhanz - Have you looked at this line here 2024-05-09T20:10:35.740+0200 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > There were failing tests. See the report at: file:///Users/ibtisam.khan/dcs/dev/dcs-app-automated-tests/build/reports/tests/test/index.html Not sure what we can do from TestNG side here unless and until you can simulate the problem using a command line invocation |
Beta Was this translation helpful? Give feedback.
Thank you for looking into this issue. I was able to find out reason why TestNG reports were not being produced. It turned out, for some of my tests, NullPointerException was being thrown in the test listener causing Gradle to throw this below exception and not generating TestNG reports
org.gradle.api.internal.tasks.testing.TestSuiteExecutionException: Could not complete execution for Gradle Test Executor 30.
It seems to me a more gradle specific issue where it was not able to handle this exception coming from testng listener class implementation.
On my end, I was able to resolve this issue by implementing a nullsafe mechanism so tests now don't throw NullPointerException leading to succ…