jenkinsci / jenkinsci/junit-plugin

[JENKINS-4459] RSpec XML output processing could be improved to avoid hard-to-diagnose problems

Open
#841 2 comments 0 reactions 0 assignees View on GitHub
component:junit-plugin enhancement imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
87
Forks
351
Avg merge
1d 19h
Merged PRs (30d)
2

Description

[I currently have Hudson ver. 1.320]

I run Ruby Selenium tests via RSpec (run in a rake task), my tests generate XML

output (using ci_reporter, http://github.com/nicksieger/ci_reporter), which I

use Hudson's "Publish JUnit test result report" feature to process.

I was having sporadic problems with XML processing (sometimes it worked fine,

sometimes it didn't) until I figured out that the problem occurred when I

included a period in the describe statement of an RSpec example.

If a build completed with test failures, the path to the test result output (the

link with the test name, in the "test result" page) was incorrectly set so the

link would be pointing to an invalid address and I would get a 404 error. I have

created an example below to easily repro the problem.

describe 'A period at the end of this sentence breaks xml processing.' do

it 'a dummy spec method.' do

(2 + 2).should == 5

end

end

If this test is run in Hudson and the xml output generated (via ci_reporter) is

processed by Hudson, you should see the problem when attempting to view the test

results.

[Note: a period in the "it .. do" statement does not seem to cause any problem.]

I didn't log this as a defect as I doubt hudson was designed to handle this

case. However, it would be great if this case could be handled, as it was

difficult to determine the cause of my problems, and the XML processing for

RSpec/ci_reporter output works great otherwise.

---
Originally reported by dlillis, imported from: RSpec XML output processing could be improved to avoid hard-to-diagnose problems


  • status: Open
  • priority: Major
  • component(s): junit-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 0
  • imported: 2025-11-26

Raw content of original issue

[I currently have Hudson ver. 1.320]

I run Ruby Selenium tests via RSpec (run in a rake task), my tests generate XML
output (using ci_reporter, http://github.com/nicksieger/ci_reporter), which I
use Hudson's "Publish JUnit test result report" feature to process.

I was having sporadic problems with XML processing (sometimes it worked fine,
sometimes it didn't) until I figured out that the problem occurred when I
included a period in the describe statement of an RSpec example.

If a build completed with test failures, the path to the test result output (the
link with the test name, in the "test result" page) was incorrectly set so the
link would be pointing to an invalid address and I would get a 404 error. I have
created an example below to easily repro the problem.

describe 'A period at the end of this sentence breaks xml processing.' do
it 'a dummy spec method.' do
(2 + 2).should == 5
end
end

If this test is run in Hudson and the xml output generated (via ci_reporter) is
processed by Hudson, you should see the problem when attempting to view the test
results.

[Note: a period in the "it .. do" statement does not seem to cause any problem.]

I didn't log this as a defect as I doubt hudson was designed to handle this
case. However, it would be great if this case could be handled, as it was
difficult to determine the cause of my problems, and the XML processing for
RSpec/ci_reporter output works great otherwise.

  • environment: Platform: All, OS: All

Contributor guide

Open the contributing guide

Research direction

No files or tests are named. Reproduce the provided RSpec example with ci_reporter, then trace the junit-plugin processing behind Hudson’s “Publish JUnit test result report”; done means failed-test links remain valid when an RSpec describe name ends with a period without breaking existing output.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, ruby
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.