mirror of
https://github.com/apache/superset.git
synced 2024-09-12 16:49:40 -04:00
1.8 KiB
1.8 KiB
Utility script to run tests faster
By default tests will be run using the Postgres container defined at the docker-compose
file on the root of the repo,
so prior to using this script make sure to launch the dev containers.
You can use a different DB backend by defining SUPERSET__SQLALCHEMY_DATABASE_URI
env var.
Use:
From the superset repo root directory:
- Example run a single test module:
scripts/tests/run.sh tests.charts.api_tests
- Example run a single test:
scripts/tests/run.sh tests.charts.api_tests:ChartApiTests.test_get_charts
- Example run a single test, without any init procedures. Init procedures include: resetting test database, db upgrade, superset init, loading example data. If your tests are idempotent, after the first run, subsequent runs are really fast
scripts/tests/run.sh tests.charts.api_tests:ChartApiTests.test_get_charts --no-init
- Example for not recreating the test DB (will still run all the tests init procedures)
scripts/tests/run.sh tests.charts.api_tests:ChartApiTests.test_get_charts --no-reset-db