Skip to content

Latest commit

 

History

History
28 lines (24 loc) · 1.39 KB

File metadata and controls

28 lines (24 loc) · 1.39 KB

Connect integration tests

How to run tests locally

  1. Install docker
  2. To run all tests ./tests/run.sh
  3. To see some options ./test/run.sh -h;
  4. To run tests with graphic output from emulator, use -g option. Note that macOS needs some further configuration.
  5. To limit tests to subset of methods use -i getPublicKey,getAddress

How to add tests

  1. Create or modify file in ./__fixtures__
  2. Make sure it is imported in ./__fixtures__/index.js.
  3. Make sure the method you are testing is listed in travis.yml to make it run in CI

How to run tests with custom firmware

  1. Build your custom emulator with debuglink support
    • cd trezor-firmware
    • pipenv sync
    • pipenv shell
    • cd core
    • PYOPT=0 pipenv run make build_unix_frozen
    • You will find micropython file in core/build/unix
  2. Save it as trezor-emu-core-v2.[num].[num]. For example trezor-emu-core-v2.9.9. Minor and patch numbers don't matter as long as they do not conflict with already existing firmware.
  3. Run tests with ./tests/run.sh -b ~/path-to-emu/trezor-emu-core-v2.9.9 -f 2.9.9

Continuous integration

Tests are run with each commit on travis