Comments (10)
With some modifications I have the following behavior, on bold the behaviours that have changed.
The changes:
https://github.com/ros/ros_comm/compare/kinetic-devel...pal-robotics-forks:rostest-screen-output?expand=1
https://github.com/ros/ros/compare/kinetic-devel...pal-robotics:tee-test-output?expand=1
test | stdout | stderr | log info | log warn | log error |
---|---|---|---|---|---|
cpp_test | terminal | terminal | terminal | terminal | terminal |
py_test | terminal1 | terminal1 | terminal1 | terminal1 | terminal1 |
cpp_rostest | terminal | terminal | terminal | terminal | terminal |
py_rostest | terminal1 & rosunit xml | terminal1 & rosunit xml | terminal1 & rosunit xml | terminal1 & rosunit xml | terminal1 & rosunit xml |
cpp_rostest --text | terminal | terminal | terminal | terminal | terminal |
py_rostest --text | terminal | terminal | terminal | terminal | terminal |
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.
These changes would satisfy what was requested in this issue.
I see three drawbacks to these fixes:
1. cpp rostests no longer write to log file
I would say that the previous behaviour was not consistent, and difficult to use reliably since a rostest could be writing to 3 different places.
2. Logs colors are missing for python tests
Probably this can be fixed if there's an interest into these changes.
3. Tests are now more verbose
It's true
from ros.
I've been looking further into this issue. I've created this repo with examples of different ways of running tests:
https://github.com/pal-robotics/ros_testing_experiments
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:
cpp_test: C++ gtest
cpp_rostest: C++ gtest executed within rostest
py_test: Python test
py_rostest: Python test executed within rostest
Running the tests with make run_tests I have the following behaviour:
test | stdout | stderr | log info | log warn | log error |
---|---|---|---|---|---|
cpp_test | terminal | terminal | terminal | terminal | terminal |
py_test | - | terminal | - | - | - |
cpp_rostest | ~/.ros/log | terminal | ~/.ros/log | ~/.ros/log | terminal |
py_rostest | rosunit xml | rosunit xml | rosunit xml | rosunit xml | rosunit xml |
cpp_rostest --text | terminal | terminal | terminal | terminal | terminal |
py_rostest --text | terminal | terminal | terminal | terminal | terminal |
The -
indicates that the logs could not be found.
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?
What would be the desired behaviour, and if I fixed it would it make it to kinetic?
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.
from ros.
Please consider to contribute a pull request implementing this feature.
from ros.
is there any development going on about this issue?
from ros.
Not yet from our side.
We haven't discarded doing it, but it's not on our sights yet.
from ros.
Then I can start implementation of it if it is ok for you
from ros.
Sure, if you want a tester just let me know.
from ros.
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.
from ros.
Are you planning of making a PR with those changes?
from ros.
Closing due to inactivity.
from ros.
Related Issues (20)
- armel support?
- ModuleNotFoundError: No module named 'roslib' HOT 2
- Running ROS across multiple machines HOT 1
- i cant connect to rosmaster.
- ROS networks HOT 2
- The repository 'http://packages.ros.org/ros/ubuntu jammy Release' does not have a Release file. HOT 2
- Not able to find TransformListener.frameExists('marker')
- A problem in topic HOT 3
- Is there any plan to support Ubuntu 22? HOT 2
- Noetic install form source fails on mac m1 Ventura
- RLException : error loading <rosparam> tag HOT 2
- ros::NodeHandle param
- Issue getting rosbag HOT 1
- x86 docker platform cross compile aarch64 HOT 2
- [Question] roscpp - C++20/23/etc. compatibility
- Unknown CMake command "list_append_unique"
- Errors in Humble Installation no setup scripts HOT 1
- [rospack] Error: package 'rosbag_storage' not found when using bag_reader.exe on Windows
- RLException: <file_name> is neither a launch file in package <file_name> nor is <file_name> a launch file name
- Dd
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ros.