2

私はプレイを使用しています! WebDrive Moduleとジョブは正常に動作しますが、テストが失敗すると、Jenkinsのジョブは「すべてのテストが合格」と表示されます。私はテスト結果を配線しようとしていますが、私は問題に陥っています。JenkinsでWebDriverテストを実行中にテスト結果を取得するにはどうすればよいですか?

Iはジェンキンスのためではなく、エラーの結果は以下に示すことSeleniumHQプラグインを使用してみました。私はので、私はだから私は、出力が本当にセレンではないと思い

Publishing Selenium report... 
ERROR: No Test Report Found 
Build step 'Publish Selenium Report' changed build result to FAILURE 
Finished: FAILURE 

を{}アプリ/テスト結果/ FirefoxDriver/*に設定された試験結果の場所を持っていた。HTML

のFirefoxを使用しています。私は遊びを引っ張ってみました!プラグインとそれは良いオプションを与えていない。私はPlayを試しました!自動テストではビルド後の手順が報告されていましたが、アプリケーションログだけが表示されました。

最後に、私は、テストツールは、結果の公開レポートポストビルドステップを使用してみました。これは、ドキュメントが非常にひどく、Jenkinsが私が見つけることができるデバッグ/トラブルシューティング情報を提供していないので、特に不満です。

Custom Tool Pattern: {app}/test-result/FirefoxDriver/*.html 
Custom stylesheet: scripts/webdrive2junit.xsl 

私が設定したXSLは以下のとおりですが、一貫して得られるエラーはそれ以下です。誰かがwebdriveからテスト結果を取得していますか?Jenkinsの仕事へのテスト?

<?xml version="1.0" encoding="UTF-8"?> 
<!-- 
- 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. 
--> 
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
    <xsl:template match="child::body"> 
    <xsl:variable name="test" select="normalize-space(descendant::div/h1)"/> 
    <testsuite> 
     <xsl:attribute name="name"> 
     <xsl:value-of select="$test"/> 
     </xsl:attribute> 
     <testcase> 
     <xsl:attribute name="classname"> 
      <xsl:value-of select="$test"/> 
     </xsl:attribute> 
     <xsl:attribute name="name"> 
      <xsl:value-of select="descendant::div/div/table/thead/tr/th"/> 
     </xsl:attribute> 
     <xsl:if test="descendant::tr[@class=' status_failed']"> 
      <error /> 
     </xsl:if> 
     </testcase> 
    </testsuite> 
    </xsl:template> 
</xsl:stylesheet> 

ここでは、ジョブログに表示されるエラーです。

[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 [email protected]: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 "</meta>". 
    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 

答えて

0

私の現在の回避策は以下のとおりです。あらゆる改善が認められるだろう。 Playプラグインがうまく動かないので(webdriveモジュールが表示されるため)、ビルド手順はbashスクリプトです。

# work-around for the XUnit Plugin trouble; feel free to Tidy up 
find src/test-result/FirefoxDriver -name "*.html" -print0 | xargs -r0 -n 1 bash -c ' 
    testname=$(basename ${0%.html.*.html}); 
    xsltproc --html -o src/test-result/FirefoxDriver/TEST-$testname.xml scripts/webdrive2junit.xsl $0 
' 

私は(私は公開テストツールの背後にあるが、レポートポストビルドステップを引き起こすと考えている)ジェンキンスへのxUnitプラグインのコードを見て、私は私が考えた何をしていないことを実現しています。

関連する問題