Difficulty: 🔴 Hard
Category: Integration Testing
Tags:
Execution Type: launch_file
Manual testing is unscalable. Launch tests run automatically on every Pull Request to ensure new code doesn't break existing simulations or hardware drivers.
Write a launch_testing script to verify that a node starts up and publishes data correctly. This is unit testing for entire processes.
- Create a test file
test_launch.py - Define
generate_test_description - Start a
talkernode - Use
unittestto verify it publishes to/chatter(or just check process exit code for this exercise)
Output:
- A passing test execution.
- Not giving the process enough time to start before asserting.
- Launch test: launch_testing used
- Multi-node test: Multiple nodes tested
- Post-shutdown: Exit codes checked
Found an issue with this problem's description, or have a better hint?
Open a PR or report it in Discussions.
Note: TestScripts and reference solutions are maintained by the SimuCode team
and are not part of this open spec. This ensures grading integrity on simucode.online.