This test is responsible for following
- Perform basic tests on GovTool backend endpoints.
- Publish the reports to metrics server for visualization.
python -m venv venv
source venv/bin/activate
pip install -r requirements.txtTest requires that certain dreps/stakes be registered in the network.
To run setup script the main wallet must have enough balance. The address for the main wallet is
addr_test1qzc97zml9xzhm7xcsmqretkk7ztzyehj3dpd7ph7h0s40wp0ea9f3e353pmmr7yxv7m2dj09rn44m7pvd0m4cylusn8szlm75t
Run the setup script as follow.
export KUBER_API_URL="..."
export KUBER_API_KEY="..." # if not self hosting.
python3 ./setup.pyThis will generate test_data.json that will be used to run tests.
In the root directory of tests/govtool-backend run the following command
export BASE_URL="url" # server's url e.g. https://staging.govtool.byron.network/api"
export METRICS_URL="url" # metrics server Url
export METRICS_API_SECRET="metrics-api-secret"
pytest -vGenerate and view test reports using Allure.
Execute tests and save results to the allure-results directory:
python -m pytest --alluredir allure-resultsLaunch the Allure dashboard to view the test report:
allure serve allure-results