Skip to content

Conversation

@SzymonParapura
Copy link
Contributor

@SzymonParapura SzymonParapura commented Jun 16, 2025

Description

This PR ensures that random_test_runner is correctly executed and verified in CI by running it with predefined test input and validating the results using result_checker.py. The tests confirm that the runner launches successfully and help detect whether recent changes to its implementation introduce any issues with execution.

Abstract

Enable CI verification for random_test_runner.

Background

An issue was reported on GitHub indicating that random_test_runner was not functioning as expected.
However, the CI system did not catch this failure, because the previous workflow lacked any mechanism to verify its results. As a result, test failures from random_test_runner could silently pass through the pipeline unnoticed.

See: #1441

Details

  1. Extended the workflow.sh script to include execution of random_test_runner [link]
  • This allows verifying whether the runner works correctly.
  • As input_dir, a predefined test input file is used. It contains only seeds from previously successful local runs.
  • Using fixed seeds eliminates randomness, making test runs reproducible.
  • To validate test results, the result_checker.py script is used.
  1. Defined the spawn_ego_as_npc parameter
  • The spawn_ego_as_npc parameter was added to the random_test_runner launch file. It allows users to specify whether the EGO vehicle should be spawned as an npc (i.e., not controlled by Autoware).
  • It is declared with a default value of "false" and can be overridden when launching the test runner.
  • This is particularly useful for running tests in environments where Autoware is not available, such as CI.
  • By default, the EGO is spawned using traffic_simulator::VehicleBehavior::autoware(), which requires an Autoware. When spawn_ego_as_npc is set to true, the EGO is spawned as a regular NPC entity link.

In short, this enables running random_test_runner tests in CI without requiring Autoware.

  1. Added support for launching RViz when running without Autoware
  • Introduced the launch_rviz parameter (default: false) link.
  • When running without Autoware (spawn_ego_as_npc:=true), RViz can be useful for local visualization and debugging.

References

Jira ticket

Destructive Changes

N/A

Known Limitations

N/A

@SzymonParapura SzymonParapura self-assigned this Jun 16, 2025
@github-actions
Copy link

Checklist for reviewers ☑️

All references to "You" in the following text refer to the code reviewer.

  • Is this pull request written in a way that is easy to read from a third-party perspective?
  • Is there sufficient information (background, purpose, specification, algorithm description, list of disruptive changes, and migration guide) in the description of this pull request?
  • If this pull request contains a destructive change, does this pull request contain the migration guide?
  • Labels of this pull request are valid?
  • All unit tests/integration tests are included in this pull request? If you think adding test cases is unnecessary, please describe why and cross out this line.
  • The documentation for this pull request is enough? If you think adding documents for this pull request is unnecessary, please describe why and cross out this line.

@SzymonParapura SzymonParapura marked this pull request as draft June 16, 2025 09:52
SzymonParapura and others added 6 commits June 16, 2025 12:35
- Added `test/ci_test_inputs/` directory with predefined input data for CI tests
- Modified test executor to support the `spawn_ego_as_npc` parameter (default: false)
- Updated CI runner script to execute `random_test_runner` with input_dir from `ci_test_inputs`
- Ensured test results are validated via `result_checker` and proper exit status is returned
@SzymonParapura SzymonParapura added the bump patch If this pull request merged, bump patch version of the scenario_simulator_v2 label Jul 8, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 9, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bump patch If this pull request merged, bump patch version of the scenario_simulator_v2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants