Skip to main content

Test and tool containers

RemotiveTopology also provides a way to run arbitrary containers inside the topology, for example test cases or other tools. Unlike ECU containers and behavioral models, these containers don't belong to any ECU. Instead they communicate with the ECUs through the TopologyBroker, which is reachable at http://topology-broker.com:50051 inside the topology.

A common use case is to run test cases. By using an arbitrary container you can use whatever test framework you want:

containers:
tester:
profiles: [tester]
build:
dockerfile: ../tests/Dockerfile
volumes:
- ../tests:/app
working_dir: /app
command: "pytest --broker_url=http://topology-broker.com:50051 -s -vv"

The container properties are the same as for ECU containers and behavioral models. They mirror the service properties in Docker Compose, see the container schema.

Profiles​

The containers can have one or more profiles. These correspond to profiles in Docker Compose. To run the preceding tests, build the topology and start it with the tester profile:

docker compose -f build/mytopology/docker-compose.yml --profile tester up

Containers without a profile always start. Using a profile for tests lets you start the topology without them, for example in interactive mode. See Running tests for how to shut down the topology when the tests have completed.