How can i solve this org.testng.TestNGException: org.xml.sax.SAXParseException



  • org.testng.TestNGException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
        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: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source
    


  • Looks like you have malformed testng.xml. There are either some content before

    <?xml</code> or some not accepted content inside the tag. </p>

Log in to reply
 

Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2