-
Notifications
You must be signed in to change notification settings - Fork 195
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great!
As discussed offline, the last thing I'd love to see in this: right now, in some tests, we currently "manually" dynamically generate the expected XML in-memory, whenever we run the test, and then compare it to the output of the cobertura()
function.
Instead, we can commit hardcoded XML files for the expected output. We should include cases for Windows, POSIX, and mixed paths. Then use include_bytes!()
/include_str!()
to expose those file contents as &[u8]
/&str
constants in the tests
module. The test assertions can then just compare the cobertura()
function's output against those expected XML files, as strings.
This lets us avoid depending on the XML emitter in the test functions, shortens the test bodies, and lets future readers see a full, human-friendly representation of "good output", without any tricks or extra steps.
Summary of the Pull Request
Modified Cobertura output to include line-rates, covered and valid to have the summary tab show up in the Publish Cde Coverage task in the pipeline.
Modified Cobertura output to have file directory as package name and only file name as class name for every file. This creates easier to digest output in pipeline.
PR Checklist
Info on Pull Request
Modified Cobertura output to include line-rates, covered and valid to have the summary tab show up in the Publish Cde Coverage task in the pipeline.
Modified Cobertura output to have file directory as package name and only file name as class name for every file. This creates easier to digest output in pipeline.
Includes only changes to Cobertura format.
Refactored Cobertura conversion code to be more readable/debuggable and included additional tests.
Validation Steps Performed
Test Updated