internal error when tried to run a test xml file in eclipse

444 views
Skip to first unread message

johnson zeron

unread,
Feb 1, 2022, 10:35:54 AM2/1/22
to testng-users
Hi Krishnan,

I got an error when I tried to run a  ParallelCodeReviewTesting.xml  file as "TestNG Suite" within eclipse:  

error code: 
An internal error occurred during: "Launching automation-test_ParallelCodeReviewTesting.xml".
Could not initialize class org.testng.xml.LaunchSuite$ExistingSuite

Could you share what is the problem? I looked into the java code and can not tell whether it is not able to save the file or get the path of the file.

Best,
Johnson

Krishnan Mahadevan

unread,
Feb 1, 2022, 10:40:15 AM2/1/22
to testng...@googlegroups.com
Johnson,

Is there any additional context that you can share here ?

Some e.g.,

1. TestNG eclipse version being used. 
2. Sample project that we can use to reproduce the problem. 
3. Any additional details you can extract from the eclipse logs. 

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 johnson zeron <zero...@gmail.com>
Sent: Tuesday, February 1, 2022 8:00:50 PM
To: testng-users <testng...@googlegroups.com>
Subject: [testng-users] internal error when tried to run a test xml file in eclipse
 
--
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/442693d2-dfc0-4427-9f4b-60bf2669de1cn%40googlegroups.com.

johnson zeron

unread,
Feb 1, 2022, 11:31:28 AM2/1/22
to testng-users
Hi Krishnan,

 I am using the latest eclipse:
Version: 2021-06 (4.20.0)
Build id: 20210612-2011

I can try to help myself if you can provide me with what is the first class called when I right-click on an xml and select run as->TestNG Suite.  

Best,
Johnson

⇜Krishnan Mahadevan⇝

unread,
Feb 2, 2022, 2:07:34 AM2/2/22
to testng-users
I dont know the point of entry from the TestNG eclipse plugin.
But you can try setting up breakpoints in org.testng.TestNG class in perhaps the below methods

configure()
run()

Alternatively just to narrow down the problem, you can try creating a main() method which instantiates the TestNG object  and check if the run() works fine. That way we would get to know where the problem is.

public static void main(String[] args) {
TestNG testng = new TestNG();
testng.setTestSuites(Collections.singletonList("src/test/resources/mysuite.xml"));
testng.setVerbose(2);
testng.run();
}

Thanks & Regards
Krishnan Mahadevan

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

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

johnson zeron

unread,
Feb 3, 2022, 3:11:05 PM2/3/22
to testng-users

Yes, that should be a good starting point.  Thanks. 
Reply all
Reply to author
Forward
0 new messages