Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

junit output is missing name attribute in <testcase> element #575

akbertram opened this issue Feb 16, 2017 · 0 comments

junit output is missing name attribute in <testcase> element #575

akbertram opened this issue Feb 16, 2017 · 0 comments


Copy link

Currently the junit reporter writes a element for each expectation, with a classname attribute but no name attribute, leading to broken links in reporting interfaces like Jenkins:


hadley pushed a commit that referenced this issue Feb 18, 2017
* Adds name attribute to <testcase> elements in junit output

* Updated junit test data

* Removed encoding attribute from xml tag in junit results

Perhaps a different version of libxml is being used than to
generate the original output.

* Fixed indenting

* Fix JUnit output

-  "message" attribute mapped directly to expectation message
- failure/error body set to format(expectation)

This produces the same output as the summary reporter for

* Fixed expected junit output paths

* Fixed (again) junit output

Matched the stack depth numbers to those output by the
summary reporter.

*  Allow configuration of test_check() using options()

 This adds two options:
    * testthat.default_check_reporter: allows configuration of a different reporter
      to use for test_check(). For example, 'junit'
    * testthat.junit.output_file: specifies a file to which the junit xml should
      be written.

These are needed so that Ci systems can run test scripts in R packages
without modification, but first set these options() so that test output will
be written to a known location where it can be read and parsed.

* Updated with changes to JUnitReporter and new options
@hadley hadley closed this as completed Feb 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

2 participants