Ask Your Question
0

How are several test cases in a ROS test node executed?

asked 2017-10-12 01:50:44 -0500

thinwybk gravatar image

If a ROS test node (like hztest) does contain more than one test case how are they executed then? (Each with or without a new execution environment? What execution order?)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2017-10-12 21:55:12 -0500

ahendrix gravatar image

Within a rostest file, each rostest node is run separately. That is, all of the parameters are set and the normal (test fixture) nodes are started, the first <test> node is run until it exits, all of test fixture nodes are stopped, parameters are cleared, and the process repeats for the next test node.

rostest doesn't know much about the test framework within your test node; all it knows is that it produces a junit-style XML file. Therefore, if you are using a framework like gtest or python's unittest framework, all of the tests in a single test node will run in the same environment without restarting nodes (and the state of those nodes and parameters will persist between tests). Similarly, test execution order within your test node will be determined by your test framework.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-10-12 01:50:44 -0500

Seen: 643 times

Last updated: Oct 12 '17