6. Step 6 — Add feature integration tests#

What it unlocks

Runtime feature tests — Your showcase is exercised at runtime on the deployed images, not just built. This is the difference between “it ships” and “it provably works on the target”.

6.1. Two test frameworks#

The integration currently uses two separate frameworks for integration tests, each driven by its own Bazel target and run in a different CI workflow:

  • FIT — scenario-based feature integration tests (feature_integration_tests/test_cases, target //feature_integration_tests/test_cases:fit). Python/Pytest test cases that orchestrate Rust and C++ scenarios. They are executed as part of the test_and_docs workflow on the default Linux platform:

    bazel test --config=linux-x86_64 //feature_integration_tests/test_cases:fit
    
  • ITF — Integration Test Framework (feature_integration_tests/itf, target //feature_integration_tests/itf). Black-box tests that run against a booted image. They are executed for two images only — QNX (on QEMU) by build_and_test_qnx.yml and Linux x86_64 by build_and_test_linux.yml:

    # QNX image, booted under QEMU
    bazel test --config=itf-qnx-x86_64 //feature_integration_tests/itf
    # Linux x86_64 image
    bazel test --config=linux-x86_64  //feature_integration_tests/itf
    

Add black-box tests that exercise your showcase on a running target under feature_integration_tests/itf. They run against the deployed image and assert that the binary is present and behaves as expected:

def test_my_example_is_deployed(target):
    exit_code, _ = target.execute("test -f /showcases/bin/my_example")
    assert exit_code == 0

def test_my_example_runs(target):
    exit_code, out = target.execute("/showcases/bin/my_example")
    assert exit_code == 0

The existing test_run_all_showcases test invokes cli --examples=all, so any showcase you registered in Step 4 is already covered by the end-to-end run.

Note

Planned consolidation. Having two integration-test frameworks (FIT and ITF) executed by different workflows on different platforms is a known gap. The execution should be consolidated so that all integration tests — both FIT and ITF — run against all four target images (Linux x86_64, QNX, AutoSD, EBcLfSA aarch64), instead of FIT running only in test_and_docs on Linux and ITF running only for the QNX and Linux images.