Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I get Test Result during executing WebDriver tests in Jenkins?
    primarykey
    data
    text
    <p>I'm using the Play! WebDrive Module and the jobs run okay but when tests fail the Jenkins job shows 'All tests passed'. I'm trying to wire in test results but I keep running into troubles.</p> <p>I tried using the SeleniumHQ plugin for Jenkins but that results in the error shown below. I use Firefox so I had the test results location set to {app}/test-result/FirefoxDriver/*.html</p> <pre><code>Publishing Selenium report... ERROR: No Test Report Found Build step 'Publish Selenium Report' changed build result to FAILURE Finished: FAILURE </code></pre> <p>So I guess the output isn't really Selenium. I tried pulling in the Play! Plugin and that didn't give any good options. I did try out the Play! auto-test reports post-build step but that only resulted in showing the application log.</p> <p>Finally, I tried using the Publish testing tools result report post-build step. This one is particularly frustrating because docs are so awful and Jenkins doesn't provide any debugging / trouble-shooting info that I can find.</p> <pre><code>Custom Tool Pattern: {app}/test-result/FirefoxDriver/*.html Custom stylesheet: scripts/webdrive2junit.xsl </code></pre> <p>The XSL that I set up is below and then the error that I consistently get is below that. Is anyone getting test results from webdrive:test into the Jenkins job?</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;!-- - Hopefully we won't use this for long. I put it together to get some information - out of the webdrive:test results while I look for a better solution. --&gt; &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt; &lt;xsl:template match="child::body"&gt; &lt;xsl:variable name="test" select="normalize-space(descendant::div/h1)"/&gt; &lt;testsuite&gt; &lt;xsl:attribute name="name"&gt; &lt;xsl:value-of select="$test"/&gt; &lt;/xsl:attribute&gt; &lt;testcase&gt; &lt;xsl:attribute name="classname"&gt; &lt;xsl:value-of select="$test"/&gt; &lt;/xsl:attribute&gt; &lt;xsl:attribute name="name"&gt; &lt;xsl:value-of select="descendant::div/div/table/thead/tr/th"/&gt; &lt;/xsl:attribute&gt; &lt;xsl:if test="descendant::tr[@class=' status_failed']"&gt; &lt;error /&gt; &lt;/xsl:if&gt; &lt;/testcase&gt; &lt;/testsuite&gt; &lt;/xsl:template&gt; &lt;/xsl:stylesheet&gt; </code></pre> <p>Here's the error that I get in the job log.</p> <pre><code>[xUnit] [INFO] - [Custom Tool] - 1 test report file(s) were found with the pattern 'src/test-result/FirefoxDriver/*.html' relative to '/opt/ci/hudson/workspace/enterprise_another-play-test' for the testing framework 'Custom Tool'. [xUnit] [ERROR] - Conversion error Error to convert - A file not found ERROR: Publisher org.jenkinsci.plugins.xunit.XUnitPublisher aborted due to exception hudson.util.IOException2: remote file operation failed: /opt/ci/hudson/workspace/enterprise_another-play-test at hudson.remoting.Channel@34b246:build-trunk-2 ... Caused by: com.thalesgroup.hudson.plugins.xunit.exception.XUnitException: Conversion error Error to convert - A file not found at com.thalesgroup.hudson.plugins.xunit.service.XUnitConversionService.convert(XUnitConversionService.java:89) at com.thalesgroup.hudson.plugins.xunit.service.XUnitTransformer.invoke(XUnitTransformer.java:135) ... 11 more Caused by: com.thalesgroup.dtkit.util.converter.ConversionException: Error to convert - A file not found at com.thalesgroup.dtkit.util.converter.ConversionService.convert(ConversionService.java:369) at com.thalesgroup.dtkit.util.converter.ConversionService.convert(ConversionService.java:177) at com.thalesgroup.dtkit.util.converter.ConversionService.convert(ConversionService.java:114) at com.thalesgroup.dtkit.metrics.model.InputMetricXSL.convert(InputMetricXSL.java:196) at com.thalesgroup.dtkit.metrics.model.InputMetricXSL.convert(InputMetricXSL.java:202) at com.thalesgroup.hudson.plugins.xunit.service.XUnitConversionService.convertCustomInputMetric(XUnitConversionService.java:104) at com.thalesgroup.hudson.plugins.xunit.service.XUnitConversionService.convert(XUnitConversionService.java:78) ... 12 more Caused by: org.xml.sax.SAXParseException: The element type "meta" must be terminated by the matching end-tag "&lt;/meta&gt;". 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 com.thalesgroup.dtkit.util.converter.ConversionService.convert(ConversionService.java:324) ... 18 more Finished: FAILURE </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload