AbhreshSugandhi / Edureka_27thMay

0 stars 1 forks source link

issue with TESTNG-Grouping #4

Open jayanaidu33 opened 5 years ago

jayanaidu33 commented 5 years ago

TestNG Script:

package day5;

import org.testng.annotations.Test;

public class Grouping { @Test(groups="Sanity") public void Test1() {

  System.out.println("Test1");

}

@Test(groups="Smoke") public void Test2() {

  System.out.println("Test2");

}

@Test(groups="Sanity") public void Test3() {

  System.out.println("Test3");

}

@Test(groups="Smoke") public void Test4() {

  System.out.println("Test4");

} }

TestNG.XML

<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd" >

groups> Error: [RemoteTestNG] detected TestNG version 6.14.3 org.testng.TestNGException: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at org.testng.TestNG.parseSuite(TestNG.java:327) at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:348) at org.testng.TestNG.initializeEverything(TestNG.java:995) at org.testng.remote.support.RemoteTestNG6_12.initialize(RemoteTestNG6_12.java:22) at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:98) at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251) at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77) Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.provider.certpath.SunCertPathBuilder.build(Unknown Source) at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source) at java.security.cert.CertPathBuilder.build(Unknown Source) at sun.security.validator.PKIXValidator.doBuild(Unknown Source) at sun.security.validator.PKIXValidator.engineValidate(Unknown Source) at sun.security.validator.Validator.validate(Unknown Source) at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source) at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source) at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source) at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source) at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source) at sun.security.ssl.Handshaker.processLoop(Unknown Source) at sun.security.ssl.Handshaker.process_record(Unknown Source) at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source) at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(Unknown Source) at org.testng.xml.XMLParser.parse(XMLParser.java:38) at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:16) at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:9) at org.testng.xml.Parser.parse(Parser.java:152) at org.testng.xml.Parser.parse(Parser.java:233) at org.testng.TestNG.parseSuite(TestNG.java:295)
AbhreshSugandhi commented 5 years ago

where is ur XML file?

luoyq-Rockey commented 8 months ago

I have the same problem and I don't know how to solve it, but if I run it directly using TestNG.xml, won't this problem occur If I am alone in my case class run one of the cases, can appear org. Testng. TestNGException: sun. Security. The provider. Certpath. SunCertPathBuilderException: unable to find valid certification path to requested target