Forum Discussion

smartbear90211's avatar
smartbear90211
Occasional Contributor
10 years ago

How do I enable "trend of test results" in Jenkins with ReadyApi plugin v. 1.4.1?

I updated the ready-api plugin from soapui v. 5.1.0 to readyapi v. 1.4.1. Out of a sudden, Jenkins doesn't display any "test results" anymore. The builds are "green" (blue) and tests are executed. They pass as I see the following in the console output:

Ready! API 1.4.1 TestCaseRunner Summary
-----------------------------
Time Taken: 29722ms
Total TestSuites: 1
Total TestCases: 468 (0 failed)
Total TestSteps: 1444
Total Request Assertions: 1534
Total Failed Assertions: 0
Total Exported Results: 1444

 

 

However, both the section "last test result" and the generated graph "trend of test results" in Jenkins' job overview are empty. 

 

How can I re-enable this feature? 

  • kondasamy's avatar
    kondasamy
    10 years ago

    Yes Correct! It is mandatory that you should check the "Publish JUnit test result report" in Jenkins UI and I think the path where you need to publish the output (XML Report) is not necessary in Jenkins UI. So, please try this option and let us know if it helps!

     

    Thanks,

    Samy

     

    Did my reply answer your question? Give Kudos or Accept it as a Solution to help others, Thanks. ↓↓↓

    • smartbear90211's avatar
      smartbear90211
      Occasional Contributor

      Hi Samy

       

      Where does the maven plugin version 1.4.1 stores that said xml file? In the previous version (5.1.0) I did not have to check the "Publish JUnit test result report", soapui just worked out of the box. 

      • kondasamy's avatar
        kondasamy
        Regular Contributor

        The "Publish JUnit test result report" should be available in Jenkins UI. Not in the maven plugin!

         

        Thanks,

        Samy

  • smartbear90211's avatar
    smartbear90211
    Occasional Contributor

    Yes, of course ;-)

    I was wondering which file you were talking about in your previous post: "and specify the location of the XML output from your tests". I believe this is a file the ready-api maven plugin creates during test execution, right? 

    • kondasamy's avatar
      kondasamy
      Regular Contributor

      Yes Correct! It is mandatory that you should check the "Publish JUnit test result report" in Jenkins UI and I think the path where you need to publish the output (XML Report) is not necessary in Jenkins UI. So, please try this option and let us know if it helps!

       

      Thanks,

      Samy

       

      Did my reply answer your question? Give Kudos or Accept it as a Solution to help others, Thanks. ↓↓↓

      • smartbear90211's avatar
        smartbear90211
        Occasional Contributor

        Unfortunately, I have to create a new Jenkins job as "freestyle", since a Maven Jenkins job doesn't have the checkbox "Publish JUnit test result report". Doing this, I get the following error message upon execution of ready-api tests:

         

        java.io.IOException: Failed to read /var/jenkins_home/jobs/app-test-freestyle/workspace/readme.md
        Is this really a JUnit report file? Your configuration must be matching too many files
        at hudson.tasks.junit.TestResult.parse(TestResult.java:281)
        at hudson.tasks.junit.TestResult.parsePossiblyEmpty(TestResult.java:229)
        at hudson.tasks.junit.TestResult.parse(TestResult.java:164)
        at hudson.tasks.junit.TestResult.parse(TestResult.java:147)
        at hudson.tasks.junit.TestResult.<init>(TestResult.java:123)
        at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:117)
        at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:90)
        at hudson.FilePath.act(FilePath.java:980)
        at hudson.FilePath.act(FilePath.java:958)
        at hudson.tasks.junit.JUnitParser.parse(JUnitParser.java:87)
        at hudson.tasks.junit.JUnitResultArchiver.parse(JUnitResultArchiver.java:129)
        at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:141)
        at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
        at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
        at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734)
        at hudson.model.Build$BuildExecution.post2(Build.java:183)
        at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683)
        at hudson.model.Run.execute(Run.java:1770)
        at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
        at hudson.model.ResourceController.execute(ResourceController.java:89)
        at hudson.model.Executor.run(Executor.java:240)
        Caused by: org.dom4j.DocumentException: Error on line 1 of document file:///var/jenkins_home/jobs/app-test-freestyle/workspace/readme.md : Content is not allowed in prolog. Nested exception: Content is not allowed in prolog.
        at org.dom4j.io.SAXReader.read(SAXReader.java:482)
        at org.dom4j.io.SAXReader.read(SAXReader.java:264)
        at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:123)
        at hudson.tasks.junit.TestResult.parse(TestResult.java:273)
        ... 20 more
        Caused by: org.xml.sax.SAXParseException; systemId: file:///var/jenkins_home/jobs/app-test-freestyle/workspace/readme.md; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:441)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:368)
        at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1436)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:999)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:648)
        at org.dom4j.io.SAXReader.read(SAXReader.java:465)
        ... 23 more

         

        Jenkins seems to assume that a readme file (readme.md) is the generated Junit test result report file. This is wrong in this testcase, that's why I was asking which xml I have to specify in Jenkins to use as test result report file.