Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Continuous integration: levels of testing #9

Open
anijjar opened this issue Jun 27, 2020 · 0 comments
Open

Continuous integration: levels of testing #9

anijjar opened this issue Jun 27, 2020 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@anijjar
Copy link
Member

anijjar commented Jun 27, 2020

this ros page is a good resource for testing. Basically it’s split into 3 levels:

Level 1: library unit test (gunit, unittest)

  • a library unit test should test your code sans ROS (if you are having hard time testing sans ROS, you probably need to refactor your library). Make sure that your underlying functions are separated out and well tested with both common, edge, and error inputs. Make sure that the pre- and post- conditions of your methods are well tested. Also make sure that the behavior of your code under these various conditions is well documented.
  • tests methods.

Level 2: ros node unit test (rostest + unittest/guest)

  • node unit tests start up your node and test its external API, i.e. published topics, subscribed topics, and services.

Level 3. ROS nodes integration / regression test (rostest + unittest/gtest): integration tests start up multiple nodes and test that they all work together as expected. Debugging a collection of ROS nodes is like debugging multi-threaded code: it can deadlock, there can be race conditions, etc... An integration test is often the best way of uncovering the bugs.

Members will need to worry about using level 1.
Levels 2 and 3 seem a little over kill but I want an example put together that has all 3 levels. A good place to start would be the devices package

@anijjar anijjar added the documentation Improvements or additions to documentation label Jun 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant