I am getting:
org.testng.TestNGException: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:325)
at org.testng.remote.AbstractRemoteTestNG.initialize(AbstractRemoteTestNG.java:136)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:97)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
I am working on writing automation scripts using maven, testNG and selenium. when I execute my TestCases individually through RunAs-> TestNG, they execute fine . But when I try to run all the Test Cases as a suite by doing: right Click on Testng.xml-> RunAs TestNG suite. I get the above exception.
I have tried various options so far, like upgrading the TestNG version(now using 6.10.0), importing the project again, changing the POM and TestNG files. Nothing has worked so far.
I tried to Google this but could not find the answer for this issue. whatever solution is given online corresponds to SSL connection and I am not sure that that's my issue.
Can anyone please help me with this issue? Thanks in advance!
The issue seems to be with the testng.xml. Make sure the first line of .xml file should be exactly as:
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
the only issue here is "http" to be used instead of "https"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With