Test get Skipped when Testng.xml configured for suite

78 views
Skip to first unread message

Vigi Vijay

unread,
Mar 22, 2022, 4:09:42 AM3/22/22
to testng-users
Hi Team,

We have multiple test class configured in TestNG.xml. if one test fails in class the following classes are getting skipped.

We have  - Alwaysrun= true in all classes.
TestNg- 6.8  with Allure reporting

Please find the screenshot of the failure and test ng configuration


image (10).pngimage (9).pngimage (12).pngimage (11).png


Please suggest.

Thanks,
Vigi

⇜Krishnan Mahadevan⇝

unread,
Mar 22, 2022, 4:14:34 AM3/22/22
to testng-users
The latest released version of TestNG is 7.5.
Please retry using that and post back the results. If the problem persists, then please help create a simple standalone project that can be used to reproduce the error.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ https://rationaleemotions.com/


--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/testng-users/91dae6de-cd44-44bc-9d8f-9df0b1969339n%40googlegroups.com.

Vigi Vijay

unread,
Mar 22, 2022, 8:36:44 AM3/22/22
to testng-users
Hi,

Thank you, We migrated to 7.5 and retried the issue still exist.

<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.5</version>
</dependency>
[INFO]
[ERROR] Tests run: 3, Failures: 1, Errors: 0, Skipped: 1
[INFO]
[INFO] xxx-transportation-testautomation .............. SUCCESS [  0.203 s]
[INFO] automation-framework ............................... SUCCESS [  5.217 s]
[INFO] automation-base-ui ................................. SUCCESS [  1.878 s]
[INFO] automation-api ..................................... FAILURE [01:49 min]
[INFO] automation-ui ...................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:56 min
[INFO] Finished at: 2022-03-22T17:56:58+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (default-test) on project automation-api: There are test failures.
[ERROR]
[ERROR] Please refer to C:\TCX\trimble.transportation.core.iam\automation\automation-api\target\surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.

In the XML file, we added all the packages and test are run selected based on groups.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="regression" configfailurepolicy="continue" parallel = "classes" >
<test name="regression" >

If one test fails, all the following tests are skipped. The failed test retry worked, but not continuing to next one.
All test have common base class act as Super class. Individually test are fine.

Please suggest as continuous execution is completely blocked.

Thanks,
Vigi

Krishnan Mahadevan

unread,
Mar 22, 2022, 9:48:32 AM3/22/22
to testng...@googlegroups.com
Can you please create and share a simple standalone project that can be used to reproduce the problem ?

That would go a long way in helping you to figure out what is happening. 


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

From: testng...@googlegroups.com <testng...@googlegroups.com> on behalf of Vigi Vijay <vigi.v...@gmail.com>
Sent: Tuesday, March 22, 2022 6:06:43 PM
To: testng-users <testng...@googlegroups.com>
Subject: Re: [testng-users] Test get Skipped when Testng.xml configured for suite
 

Vigi Vijay

unread,
Mar 23, 2022, 7:44:38 AM3/23/22
to testng-users
Hi Krishnan,

We found the issue, the issue is in Maven Goal.

The project is multi-module, and if test fail in module and its depended to next module, the maven build was not happening.

Solved with- mvn  test -fn command
Added --"-fn" then even after failing the module, the next build happened.

I checked all Testng, assert options, base class all. But the issue seems on compile building.

Thank you for your time.

Thanks,
Vigi

Krishnan Mahadevan

unread,
Mar 23, 2022, 9:55:37 AM3/23/22
to testng...@googlegroups.com
Awesome. Good to hear that you figured this out. 

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
Sent: Wednesday, March 23, 2022 5:14:37 PM
Reply all
Reply to author
Forward
0 new messages