Skip to content

feat: add smoke tests for all 3 demos with CI integration#37

Merged
mfaferek93 merged 1 commit intomainfrom
feat/smoke-tests
Mar 7, 2026
Merged

feat: add smoke tests for all 3 demos with CI integration#37
mfaferek93 merged 1 commit intomainfrom
feat/smoke-tests

Conversation

@bburda
Copy link
Contributor

@bburda bburda commented Mar 7, 2026

Summary

  • Add host-driven smoke tests for all 3 demos (sensor_diagnostics, turtlebot3, moveit_pick_place) that exercise the gateway REST API against running Docker containers
  • Sensor: 21 tests including full fault injection cycle. Turtlebot3/moveit: health + entity discovery
  • Shared test infrastructure in tests/smoke_lib.sh
  • CI runs all 3 demos in parallel build-and-test-* jobs with failure logs and teardown
  • Fixes outdated medkit parameter names across all demos (discovery_mode -> discovery.mode, etc.)

Closes #11

Test plan

  • shellcheck passes on all test scripts
  • yamllint passes on all YAML files
  • CI build-and-test-sensor green (21/21 tests)
  • CI build-and-test-turtlebot green (22/22 tests)
  • CI build-and-test-moveit green (22/22 tests)
  • CI lint green

Copilot AI review requested due to automatic review settings March 7, 2026 08:23
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an automated smoke-test run for the sensor_diagnostics demo in CI to validate that the demo actually starts and that key gateway API flows (discovery, data, configuration, fault injection) work end-to-end.

Changes:

  • Added a host-driven smoke test script (tests/smoke_test.sh) that exercises gateway health, discovery, data/config, and fault injection/cleanup.
  • Simplified the sensor-demo-ci compose service to only start the demo (no inline curl/jq tests).
  • Restructured GitHub Actions CI into separate jobs, with build-and-test-sensor running docker compose + smoke tests.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
tests/smoke_test.sh New bash smoke tests validating the running demo via the REST API.
demos/sensor_diagnostics/docker-compose.yml Removes inline CI validation commands so tests can run externally.
.github/workflows/ci.yml Replaces single docker build job with build+compose+smoke tests for sensor demo and separate build jobs for other demos.
Comments suppressed due to low confidence (1)

demos/sensor_diagnostics/docker-compose.yml:41

  • docker compose --profile ci up will still start services that have no profiles set (e.g., sensor-demo and sovd-web-ui). Since both sensor-demo and sensor-demo-ci publish 8080:8080, enabling the ci profile will attempt to run both and can fail with a port binding conflict. Fix by either (a) putting sensor-demo/sovd-web-ui behind a non-default profile (e.g., demo) so CI only starts sensor-demo-ci, or (b) having CI explicitly start only sensor-demo-ci.
  # For CI testing - headless mode, tests run externally
  sensor-demo-ci:
    profiles: ["ci"]
    build:
      context: .
      dockerfile: Dockerfile
    container_name: sensor_diagnostics_demo_ci
    environment:
      - ROS_DOMAIN_ID=40
    ports:
      - "8080:8080"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bburda bburda force-pushed the feat/smoke-tests branch from 20345e1 to 857a180 Compare March 7, 2026 11:39
@bburda bburda changed the title Add smoke tests for sensor_diagnostics demo feat: add smoke tests for all 3 demos with CI integration Mar 7, 2026
@bburda bburda force-pushed the feat/smoke-tests branch from 857a180 to f96ef9d Compare March 7, 2026 11:50
mfaferek93

This comment was marked as outdated.

Copy link

@mfaferek93 mfaferek93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor findings

Add host-driven smoke tests that exercise the gateway REST API against
running Docker containers for sensor_diagnostics, turtlebot3, and
moveit_pick_place demos.

Sensor smoke tests (21 tests): health, entity discovery (areas,
components, apps), data access, configurations, and full fault
injection cycle (inject -> detect -> verify detail -> cleanup).

Turtlebot3 and moveit smoke tests: health + entity discovery against
their respective manifests.

Shared test infrastructure in tests/smoke_lib.sh: pass/fail counters,
colored output, api_get/poll_until helpers, wait_for_gateway,
wait_for_runtime_linking, test_entity_discovery.

CI changes:
- All 3 demos build + run smoke tests in parallel jobs
- Container logs shown on failure, teardown on always()
- Docker Compose CI profiles for each demo

Also fixes outdated medkit parameter names across all 3 demos
(discovery_mode -> discovery.mode, manifest_path ->
discovery.manifest_path) to match current ros2_medkit API.

Closes #11
@bburda bburda force-pushed the feat/smoke-tests branch from f96ef9d to 1e5cdcf Compare March 7, 2026 17:35
@mfaferek93 mfaferek93 merged commit c1d01ef into main Mar 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add smoke tests for demos

3 participants