-
Notifications
You must be signed in to change notification settings - Fork 20
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
Generate test result from cargo test #3
Comments
I've never used cargo-test-junit but its unresolved issues doesn't make it look like an attractive dependency. Is it reliable in your experience ? Do you plan on having your output feature merged in the original repo ? |
I agree that cargo-test-junit is not an attractive dependency. It seems not maintained, that's why I did not make PR. In my opinion, the best way to solve it would be to parse cargo test output in python directly. The goal is to capture test output in python:
and transform it into 3 (?) xml outputs for unit, doc, and integration tests:
I guess that would be the minimum requirement for parsing outputs by colcon test-result. Does this solution sound good to you? I can try to implement it in python during the weekend. |
I dug a bit around cargo test output and it looks like it's still a work in progress, so any solution we come with should be considered temporary. See these threads for reference: I'm OK with your solution since it shouldn't add any dependency and do the job while cargo test output becomes more mature. About the three XML outputs, I'm not aware of JUnit conventions but maybe tests results might land in a single file formatted this way: <?xml version='1.0'?>
<testsuites name='tests' errors='0' failures='0' tests='8'>
<testsuite name='unit' errors='0' failures='0' tests='4'></testsuite>
<testsuite name='doc' errors='0' failures='0' tests='2'></testsuite>
<testsuite name='integration' errors='0' failures='0' tests='2'></testsuite>
</testsuites> |
Calling colcon test should generate xml report with information about passed/failed tests.
Otherwise
colcon test-result --all
is not able to give information about rust tests.The only solution I found is:
Is there a nicer way how to get test-results ?
The text was updated successfully, but these errors were encountered: