Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 1.45 KB

TESTING.md

File metadata and controls

36 lines (26 loc) · 1.45 KB

SCION Testing Framework

All commands are relative to the top-level directory

Unit tests

General usage

  1. Run all tests: ./scion.sh test
  2. Run all language specific tests: ./scion.sh test py, ./scion.sh test go

Python specific usage

  1. Run all tests in a specific file: ./scion.sh test py test/lib/packet/opaque_field_test.py
  2. Run a specific test: ./scion.sh test py test.lib.packet.opaque_field_test:TestHopOpaqueFieldCalcMac
  3. Run a specific test function: ./scion.sh test py test/lib/packet/opaque_field_test.py:TestHopOpaqueFieldCalcMac.test_prev
  4. See which tests are being run: ./scion.sh test py -v

Code coverage

To get a html report of the testing coverage, run ./scion.sh coverage

Integration Tests

Several integration tests can be found under python/integration. Before running any of those tests, you have to start the infrastructure (./scion.sh start).

To run all integration tests run integration/integration_test.sh. This will start the infrastructure, however, it doesn't compile it. If you haven't compiled the infrastructure yet or made local changes then first run make.

Docker

It's possible to run the entire infrastructure in a docker container. For more information see docker/README.md.

Circle-CI

The SCION project uses Circle-CI as its continuous integration platform. To run a local version of Circle-CI first build a docker image as described in docker/README.md and then run tools/ci/local.