Files
app-ethereum/tests/speculos
2024-01-31 16:21:45 +01:00
..
2022-07-25 11:42:45 +02:00
2022-07-25 11:40:52 +02:00
2022-06-28 15:11:20 +02:00
2023-02-20 17:01:57 +01:00
2022-09-15 16:49:20 +02:00
2022-06-28 15:11:20 +02:00
2023-07-31 10:50:23 +02:00
2022-07-22 11:59:45 +02:00
2022-07-22 11:26:02 +02:00
2022-07-22 11:59:45 +02:00
2022-07-22 11:59:45 +02:00
2022-07-22 11:59:45 +02:00
2022-07-22 11:59:45 +02:00
2023-04-24 11:30:15 +02:00

Speculos functional tests

These tests are implemented in Python with the SpeculosClient interface which allows easy execution on the Speculos emulator.

Requirements

Dependencies

Python dependencies are listed in requirements.txt

python3 -m pip install -r requirements.txt

Usage

Compilation app

Go to the root of the repository:

make DEBUG=1 NFT_TESTING_KEY=1 BOLOS_SDK=$NANOX_SDK
mv bin/app.elf tests/speculos/<some name>.elf

Given the requirements are installed, just do (by default command):

cd tests/speculos/
pytest

Custom options

  • --model: "nanos", "nanox", "nanosp" | default: "nanos"
  • --display: "qt", "headless" | default: "qt"
  • --path: the path of the binary app | default: path of makefile compilation

Example

With nanox binary app:

# the --path is variable to where you put your binary

pytest --model nanox --path ./elfs/nanox.elf

# Execute specific test:
pytest --model nanox --path ./elfs/nanox.elf test_pubkey_cmd.py