Extent reports issue in maven project



  • I am using extent reports in my project but it is showing me error and I am not getting solution for this error:

    [RemoteTestNG] detected TestNG version 6.14.3 Starting ChromeDriver 75.0.3770.140 (2d9f97485c7b07dc18a74666574f19176731995c-refs/branch-heads/3770@{#1155}) on port 45800 Only local connections are allowed. Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code. [1566459495.752][WARNING]: This version of ChromeDriver has not been tested with Chrome version 76. Aug 22, 2019 1:08:16 PM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Detected dialect: W3C [Fatal Error] testng-1.0.dtd:1:3: The markup declarations contained or pointed to by the document type declaration must be well-formed. org.xml.sax.SAXParseException; systemId: http://testng.org/testng-1.0.dtd; lineNumber: 1; columnNumber: 3; The markup declarations contained or pointed to by the document type declaration must be well-formed. at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source) at javax.xml.parsers.DocumentBuilder.parse(Unknown Source) at com.relevantcodes.extentreports.Configuration.getConfigurationMap(Configuration.java:38) at com.relevantcodes.extentreports.Report.loadConfig(Report.java:474) at com.relevantcodes.extentreports.ExtentReports.loadConfig(ExtentReports.java:481) at com.qa.testcases.LoginPageTest.startTest(LoginPageTest.java:65) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124) at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:59) at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:458) at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:222) at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142) at org.testng.TestRunner.beforeRun(TestRunner.java:529) at org.testng.TestRunner.run(TestRunner.java:497) at org.testng.SuiteRunner.runTest(SuiteRunner.java:455) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415) at org.testng.SuiteRunner.run(SuiteRunner.java:364) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208) at org.testng.TestNG.runSuitesLocally(TestNG.java:1137) at org.testng.TestNG.runSuites(TestNG.java:1049) at org.testng.TestNG.run(TestNG.java:1017) at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115) at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251) at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77) FAILED CONFIGURATION: @BeforeTest startTest java.lang.NullPointerException at com.relevantcodes.extentreports.Report.loadConfig(Report.java:480) at com.relevantcodes.extentreports.ExtentReports.loadConfig(ExtentReports.java:481) at com.qa.testcases.LoginPageTest.startTest(LoginPageTest.java:65) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124) at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:59) at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:458) at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:222) at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142) at org.testng.TestRunner.beforeRun(TestRunner.java:529) at org.testng.TestRunner.run(TestRunner.java:497) at org.testng.SuiteRunner.runTest(SuiteRunner.java:455) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415) at org.testng.SuiteRunner.run(SuiteRunner.java:364) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208) at org.testng.TestNG.runSuitesLocally(TestNG.java:1137) at org.testng.TestNG.runSuites(TestNG.java:1049) at org.testng.TestNG.run(TestNG.java:1017) at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115) at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251) at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)

          SKIPPED CONFIGURATION: @AfterTest endReport
          SKIPPED CONFIGURATION: @AfterTest tearDown1
    

    =========================================================================== Default test
    Tests run: 0, Failures: 0, Skips: 0

    Configuration Failures: 1, Skips: 2

    =========================================================================== Default suite Total tests run: 0, Failures: 0, Skips: 0 Configuration

    Failures: 1, Skips: 2

    [TestNG] No tests found. Nothing was run Usage: [options] The XML suite files to run Options: -configfailurepolicy Configuration failure policy (skip or continue) -d Output directory -dataproviderthreadcount Number of threads to use when running data providers -excludegroups Comma-separated list of group names to exclude -groups Comma-separated list of group names to be run -junit JUnit mode Default: false -listener List of .class files or list of class names implementing ITestListener or ISuiteListener -methods Comma separated of test methods Default: [] -methodselectors List of .class files or list of class names implementing IMethodSelector -mixed Mixed mode - autodetect the type of current test and run it with appropriate runner Default: false -objectfactory List of .class files or list of class names implementing ITestRunnerFactory -parallel Parallel mode (methods, tests or classes) Possible Values: [tests, methods, classes, instances, none, true, false] -port The port -reporter Extended configuration for custom report listener -suitename Default name of test suite, if not specified in suite definition file or source code -suitethreadpoolsize Size of the thread pool to use to run suites Default: 1 -testclass The list of test classes -testjar A jar file containing the tests -testname Default name of test, if not specified in suitedefinition file or source code -testnames The list of test names to run -testrunfactory, -testRunFactory The factory used to create tests -threadcount Number of threads to use when running tests in parallel -usedefaultlisteners Whether to use the default listeners Default: true -log, -verbose Level of verbosity -xmlpathinjar The full path to the xml file inside the jar file (only valid if -testjar was specified) Default: testng.xml



  • From the looks of the error:

    The markup declarations contained or pointed to by the document type declaration must be well-formed. 
    at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source) 
    at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source) 
    at javax.xml.parsers.DocumentBuilder.parse(Unknown Source) 
    at com.relevantcodes.extentreports.Configuration.getConfigurationMap(Configuration.java:38)
    at com.relevantcodes.extentreports.Report.loadConfig(Report.java:474) 
    at com.relevantcodes.extentreports.ExtentReports.loadConfig(ExtentReports.java:481)
    

    You are using an extent-config.xml file but the file is not formatted correctly.



Suggested Topics

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