-
Notifications
You must be signed in to change notification settings - Fork 791
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
rosunit should allow simultaneous XML output and text output #110
Comments
Please consider to contribute a pull request implementing this feature. |
is there any development going on about this issue? |
Not yet from our side. We haven't discarded doing it, but it's not on our sights yet. |
Then I can start implementation of it if it is ok for you |
Sure, if you want a tester just let me know. |
I changed the super class of _XMLTestResult from 'unittest.TestResult' to 'unittest.TextTestResult'. And also updated the functions like 'startTest', 'stopTest', 'addError' etc. With this change we can write the output to the stdout while creating the xml. I need to do some spot checks to be sure it is working correctly then I will open a PR for this changes. |
I've been looking further into this issue. I've created this repo with examples of different ways of running tests: With the kinetic-devel branch, I'm not seeing a uniform behaviour with regards to the handling of the log output of the tests: I am testing four cases, the bold text is the name I'll use: Running the tests with make run_tests I have the following behaviour:
The With @talhaHavadar changes I see the same behaviour, but the generated XML are invalid (that was the cause of the test failure in #163). @dirk-thomas Do you know if this is the actual behaviour or am I doing something wrong? From my understanding, at least cpp_rostest and py_rostest should have the same behaviour, and log onto the rosunit (or maybe rostest?) xml file. Regardless of what was requested in this issue. And cpp_test and py_test should log everything to the terminal. Finally, what was requested from this issue, it would be that cpp_rostest and py_rostest also logged to the terminal while still creating an xml with the result for parsers such as jenkins. |
With some modifications I have the following behavior, on bold the behaviours that have changed. The changes:
1 The logs have no color, probably related to the py logging macros, haven't looked into it. While keeping test result output to XML for jenkins. I see three drawbacks to these fixes: 1. cpp rostests no longer write to log file 2. Logs colors are missing for python tests 3. Tests are now more verbose |
Are you planning of making a PR with those changes? |
Closing due to inactivity. |
Right now we are executing unit tests using make test in our buildfarm.
Fixing an unexpected failure or a crash on a unit test in the buildfarm is an almost impossible task since we have no logs and the XML output only reports a crash and zero useful logs.
Example of XML output on the case of a crash:
It would be very helpful to have alll std output as part of the XML report, if it cannot be made visible in the terminal running the tests.
The text was updated successfully, but these errors were encountered: