私たちはJenkinsのインストールと、NUnitによってテストされたいくつかのプロジェクトを持っています。これは正常に動作し、NUnit結果XMLファイルを書き込みます。 次に、「公開NUnitテスト結果レポート」ビルド後の手順があります。しかし、金曜日以降、このエラーが発生します。Jenkins CI: 'NumberFormatException:空の文字列'
Recording NUnit tests results
ERROR: Step ‘Publish NUnit test result report’ aborted due to exception:
java.io.IOException: remote file operation failed: C:\Jenkins\workspace\xxx at [email protected]:CIAgent: java.io.IOException: Failed to read C:\Jenkins\workspace\xxx\temporary-junit-reports\TEST-xxx_Tests.TestsWithRealServers.TestWithTwoLocals_1_2.xml
at hudson.FilePath.act(FilePath.java:986)
at hudson.FilePath.act(FilePath.java:968)
at hudson.plugins.nunit.NUnitPublisher.getTestResult(NUnitPublisher.java:226)
[...]
Caused by: java.io.IOException: Failed to read C:\Jenkins\workspace\xxx\temporary-junit-reports\TEST-xxx_Tests.TestsWithRealServers.TestWithTwoLocals_1_2.xml
at hudson.tasks.junit.TestResult.parse(TestResult.java:306)
at hudson.tasks.junit.TestResult.parsePossiblyEmpty(TestResult.java:244)
at hudson.tasks.junit.TestResult.parse(TestResult.java:175)
[...]
... 13 more
Caused by: java.lang.NumberFormatException: empty String
at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
at sun.misc.FloatingDecimal.parseFloat(Unknown Source)
at java.lang.Float.parseFloat(Unknown Source)
[...]
Archiving artifacts
Finished: FAILURE
XMLファイルが作業ディレクトリにあります。このファイルの最初の行は次のようになります:
<?xml version="1.0" encoding="UTF-8"?><testsuite errors="0" failures="0" name="xxx_Tests.TestsWithRealServers.TestWithTwoLocals" skipped="6" tests="6" time="">
私は時間属性が空であるために失敗したと思います。
私はこれをどのように修正できますか、またはこのエラーが発生する理由はありますか? ありがとう!
これは実際にNUnitによって生成された結果ファイルではないようです。それはどう? – Charlie
NUnit結果ファイル:http://pastebin.com/HEZuUVWv –