-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* 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 errors/failures. * 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 NEWS.md with changes to JUnitReporter and new options
- Loading branch information
Showing
4 changed files
with
88 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,84 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<testsuites> | ||
<testsuite name="Expectations" timestamp="1999:12:31 23:59:59" hostname="nodename" tests="6" skipped="0" failures="4" errors="0" time="0"> | ||
<testcase time="0" classname="Expectations.Success"/> | ||
<testcase time="0" classname="Expectations.Failure:1"> | ||
<failure type="failure" message="expectation_failure in structure(list(fail()), start_frame = 57): Failure has been forced @reporters/tests.R#8"/> | ||
<testcase time="0" classname="Expectations" name="Success"/> | ||
<testcase time="0" classname="Expectations" name="Failure:1"> | ||
<failure type="failure" message="Failure has been forced">Failure has been forced | ||
</failure> | ||
</testcase> | ||
<testcase time="0" classname="Expectations.Failure:2a"> | ||
<failure type="failure" message="expectation_failure in structure(list(f(), fail()), start_frame = 57): Failure has been forced @reporters/tests.R#12"/> | ||
<testcase time="0" classname="Expectations" name="Failure:2a"> | ||
<failure type="failure" message="Failure has been forced">Failure has been forced | ||
</failure> | ||
</testcase> | ||
<testcase time="0" classname="Expectations.Failure:2b"> | ||
<failure type="failure" message="expectation_failure in structure(list(expect_true(FALSE)), start_frame = 57): FALSE isn't true. @reporters/tests.R#15"/> | ||
<testcase time="0" classname="Expectations" name="Failure:2b"> | ||
<failure type="failure" message="FALSE isn't true.">FALSE isn't true. | ||
</failure> | ||
</testcase> | ||
<testcase time="0" classname="Expectations.Failure:loop"> | ||
<failure type="failure" message="expectation_failure in structure(list(expect_equal(i, 2)), start_frame = 57): `i` not equal to 2. 1/1 mismatches [1] 1 - 2 == -1 @reporters/tests.R#20"/> | ||
<testcase time="0" classname="Expectations" name="Failure:loop"> | ||
<failure type="failure" message="`i` not equal to 2.">`i` not equal to 2. | ||
1/1 mismatches | ||
[1] 1 - 2 == -1 | ||
</failure> | ||
</testcase> | ||
<testcase time="0" classname="Expectations.Failure:loop"/> | ||
<testcase time="0" classname="Expectations" name="Failure:loop"/> | ||
</testsuite> | ||
<testsuite name="Errors" timestamp="1999:12:31 23:59:59" hostname="nodename" tests="2" skipped="0" failures="0" errors="2" time="0"> | ||
<testcase time="0" classname="Errors.Error:1"> | ||
<error type="error" message="expectation_error in structure(list(stop("stop")), start_frame = 57): stop @reporters/tests.R#28"/> | ||
<testcase time="0" classname="Errors" name="Error:1"> | ||
<error type="error" message="stop">stop | ||
1: stop("stop") at reporters/tests.R:28</error> | ||
</testcase> | ||
<testcase time="0" classname="Errors.Error:3"> | ||
<error type="error" message="expectation_error in structure(list(f(), g(), h(), stop("!")), start_frame = 57): ! @reporters/tests.R#36"/> | ||
<testcase time="0" classname="Errors" name="Error:3"> | ||
<error type="error" message="!">! | ||
1: f() at reporters/tests.R:36 | ||
2: g() at reporters/tests.R:32 | ||
3: h() at reporters/tests.R:33 | ||
4: stop("!") at reporters/tests.R:34</error> | ||
</testcase> | ||
</testsuite> | ||
<testsuite name="Recursion" timestamp="1999:12:31 23:59:59" hostname="nodename" tests="1" skipped="0" failures="0" errors="1" time="0"> | ||
<testcase time="0" classname="Recursion.Recursion:1"> | ||
<error type="error" message="expectation_error in structure(list(f(), f(), f(), f(), f(), f(), f(), f(), f(), f(), : evaluation nested too deeply: infinite recursion / options(expressions=)? @reporters/tests.R#43"/> | ||
<testcase time="0" classname="Recursion" name="Recursion:1"> | ||
<error type="error" message="evaluation nested too deeply: infinite recursion / options(expressions=)?">evaluation nested too deeply: infinite recursion / options(expressions=)? | ||
1: f() at reporters/tests.R:43 | ||
2: f() at reporters/tests.R:42 | ||
3: f() at reporters/tests.R:42 | ||
4: f() at reporters/tests.R:42 | ||
5: f() at reporters/tests.R:42 | ||
6: f() at reporters/tests.R:42 | ||
7: f() at reporters/tests.R:42 | ||
8: f() at reporters/tests.R:42 | ||
9: f() at reporters/tests.R:42 | ||
10: f() at reporters/tests.R:42 | ||
... | ||
166: f() at reporters/tests.R:42 | ||
167: f() at reporters/tests.R:42 | ||
168: f() at reporters/tests.R:42 | ||
169: f() at reporters/tests.R:42 | ||
170: f() at reporters/tests.R:42 | ||
171: f() at reporters/tests.R:42 | ||
172: f() at reporters/tests.R:42 | ||
173: f() at reporters/tests.R:42 | ||
174: f() at reporters/tests.R:42 | ||
175: f() at reporters/tests.R:42</error> | ||
</testcase> | ||
</testsuite> | ||
<testsuite name="Skips" timestamp="1999:12:31 23:59:59" hostname="nodename" tests="3" skipped="3" failures="0" errors="0" time="0"> | ||
<testcase time="0" classname="Skips.Skip:1"> | ||
<testcase time="0" classname="Skips" name="Skip:1"> | ||
<skipped/> | ||
</testcase> | ||
<testcase time="0" classname="Skips.Skip:2"> | ||
<testcase time="0" classname="Skips" name="Skip:2"> | ||
<skipped/> | ||
</testcase> | ||
<testcase time="0" classname="Skips.Skip:3"> | ||
<testcase time="0" classname="Skips" name="Skip:3"> | ||
<skipped/> | ||
</testcase> | ||
</testsuite> | ||
<testsuite name="Warnings" timestamp="1999:12:31 23:59:59" hostname="nodename" tests="3" skipped="0" failures="0" errors="0" time="0"> | ||
<testcase time="0" classname="Warnings.Warning:1"/> | ||
<testcase time="0" classname="Warnings.Warning:2"/> | ||
<testcase time="0" classname="Warnings.Warning:2"/> | ||
<testcase time="0" classname="Warnings" name="Warning:1"/> | ||
<testcase time="0" classname="Warnings" name="Warning:2"/> | ||
<testcase time="0" classname="Warnings" name="Warning:2"/> | ||
</testsuite> | ||
<testsuite name="Output" timestamp="1999:12:31 23:59:59" hostname="nodename" tests="2" skipped="0" failures="0" errors="0" time="0"> | ||
<testcase time="0" classname="Output.Output:1"/> | ||
<testcase time="0" classname="Output.Output:1"/> | ||
<testcase time="0" classname="Output" name="Output:1"/> | ||
<testcase time="0" classname="Output" name="Output:1"/> | ||
</testsuite> | ||
</testsuites> | ||
</testsuites> |