View source: R/parse-test-output.R
parse_golang_test_json | R Documentation |
Parses output of go test --json
into a tibble for mrgvalidate
to consume.
parse_golang_test_json(test_file, roll_up_ids = TRUE)
test_file |
Path to a |
roll_up_ids |
If |
Any tests without Test Id's (correctly formatted in brackets) will be thrown out.
All tests and subtests with the same Test Id will be rolled up to a single
row in the output tibble. The passed,failed
counts will reflect the number
of tests/subtests that were rolled up this way. The test names for a set of
rolled up ID's must share a common prefix, which will be used as the new test
name. Any trailing spaces, slashes, colons, or underscores will be removed
from the extracted prefix.
Any test with more than one Test Id will have only the first Test Id extracted. Any subsequent Test Id's for that test will be ignored. Generally, the first Id will be the least specific, since subsequent Id's will likely have been added as part of subtests. Keep this in mind when adding Testd Id's in your Go test code.
A tibble formatted according to mrgvalidate::input_formats
mrgvalidate::input_formats
, mrgvalidate::create_package_docs()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.