[JIRA] [junit-plugin] (JENKINS-34598) JUnit plugin: archiving of test reports fails when time attribute of test suite is empty

4 views
Skip to first unread message

berbuir@cleverbridge.com (JIRA)

unread,
May 4, 2016, 7:06:01 AM5/4/16
to jenkinsc...@googlegroups.com
Bernhard Berbuir created an issue
 
Jenkins / Bug JENKINS-34598
JUnit plugin: archiving of test reports fails when time attribute of test suite is empty
Issue Type: Bug Bug
Assignee: Unassigned
Components: junit-plugin
Created: 2016/May/04 11:05 AM
Environment: JUnit plugin 1.11 / 1.12
Labels: plugin
Priority: Major Major
Reporter: Bernhard Berbuir

Version 1.11 contains an improvement to get test suite duration from time attribute (Testsuite duration can be retrieved from its time attribute if it exists).
The code checks if the time attribute exits (is not null) but it does not handle empty time attributes (time=""). The test execution tool and JUnit report generator which is used by my jobs creates an empty time attribute when all test cases of a test suite are ignored. This causes the following stacktrace when the JUnit plugin tries to parse the test report:
Publish JUnit test result report (hudson.tasks.junit.JUnitResultArchiver@1c146e) aborted due to exception
{{java.io.IOException: Failed to read \jenkinsworkspace\jobname\artifacts\Testreport\testreport.junit.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)
at hudson.tasks.junit.TestResult.parse(TestResult.java:154)
at hudson.tasks.junit.TestResult.<init>(TestResult.java:126)
at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:132)
at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:107)
at hudson.FilePath.act(FilePath.java:990)
at hudson.FilePath.act(FilePath.java:968)
at hudson.tasks.junit.JUnitParser.parseResult(JUnitParser.java:103)
at hudson.tasks.junit.JUnitResultArchiver.parse(JUnitResultArchiver.java:127)
at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:148)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
at org.jenkins_ci.plugins.flexible_publish.builder.FailFastBuilder.perform(FailFastBuilder.java:102)
at org.jenkins_ci.plugins.run_condition.BuildStepRunner$2.run(BuildStepRunner.java:110)
at org.jenkins_ci.plugins.run_condition.BuildStepRunner$Fail.conditionalRun(BuildStepRunner.java:154)
at org.jenkins_ci.plugins.run_condition.BuildStepRunner.perform(BuildStepRunner.java:105)
at org.jenkins_ci.plugins.flexible_publish.strategy.FailFastExecutionStrategy.perform(FailFastExecutionStrategy.java:63)
at org.jenkins_ci.plugins.flexible_publish.ConditionalPublisher.perform(ConditionalPublisher.java:206)
at org.jenkins_ci.plugins.flexible_publish.FlexiblePublisher.perform(FlexiblePublisher.java:124)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
at hudson.model.Build$BuildExecution.post2(Build.java:185)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
at hudson.model.Run.execute(Run.java:1763)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: java.lang.NumberFormatException: empty String
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1842)
at sun.misc.FloatingDecimal.parseFloat(FloatingDecimal.java:122)
at java.lang.Float.parseFloat(Float.java:451)
at hudson.tasks.junit.SuiteResult.<init>(SuiteResult.java:170)
at hudson.tasks.junit.SuiteResult.parseSuite(SuiteResult.java:144)
at hudson.tasks.junit.SuiteResult.parseSuite(SuiteResult.java:139)
at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:129)
at hudson.tasks.junit.TestResult.parse(TestResult.java:301)
... 28 more}}

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

berbuir@cleverbridge.com (JIRA)

unread,
May 4, 2016, 7:06:03 AM5/4/16
to jenkinsc...@googlegroups.com

berbuir@cleverbridge.com (JIRA)

unread,
May 4, 2016, 7:26:01 AM5/4/16
to jenkinsc...@googlegroups.com

berbuir@cleverbridge.com (JIRA)

unread,
Mar 1, 2017, 6:23:02 AM3/1/17
to jenkinsc...@googlegroups.com
Bernhard Berbuir closed an issue as Fixed
 

Has been fixed with version 1.13 of JUnit plugin.

Change By: Bernhard Berbuir
Status: Open Closed
Resolution: Fixed
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages