This is an old revision of the document!
The primary goal of the unit tests are to expand the code coverage for subsystems, typically by mocking the variables necessary to test a single function.
Functional tests are used to perform a more in-depth analysis of the degree of functionality for a specific subsystem. Many of the functional tests written for the submarine modules will focus on accuracy of measurements and readings. This will be extremely important in verifying the reliability of the SLAM system implemented on the submarine as new modules are transitioned from simulated testing to real-world.
Real-world testing is often performed at Gibb pool, which allows for full systems testing with an in-water pinger.
To compile all tests, execute the following command from any directory:
$ rsmake tests
To run all tests, execute the following command from any directory:
$ rsmake run_tests
To run a single test, execute the following command from any directory:
$ rostest robosub <test_name>
By default, rostest creates a new master for all publishers and subscribers. If you wish to view messages being passed between nodes, simply add --reuse-master
to the above command.