console-test
is a repository containing end-to-end tests for a console application using vega-market-sim. This README will guide you through setting up your environment and running the tests.
- Install Poetry: Follow the instructions on the official Poetry website.
- Install Docker: Follow the instructions on the offical Docker website.
- Set up a Poetry environment:
poetry shell
- Install the necessary dependencies:
poetry install
- Install playwright:
playwright install
- **Download the necessary binaries: Run the following command within your Python environment (use force so that the binaries are overwritten, current version depends on the environment you want to check):
python -m vega_sim.tools.load_binaries --force --version $VEGA_VERSION
- Pull the docker image of the trading app:
You can pull the image you want to test, for example:
or
docker pull vegaprotocol/trading:develop
All available images can be found here.docker pull vegaprotocol/trading:main
- Start Docker: Make sure your Docker daemon is running.
- Run the tests: You can run tests with:
poetry run pytest -s --headed
To run a specific test, use the -k
option followed by the name of the test:
poetry run pytest -k "order_match" -s
If you want to run tests in parallel, use the --numprocesses auto option. --dist loadfile makes sure that there are no multiple runners assigned to single test file:
poetry run pytest -s --headed --numprocesses auto --dist loadfile