Running tests
Table of contents
Introduction
feature:test runs a feature’s tests inside your product’s web container. product:test runs them for whole products, followed by each product’s own tests. Start the product first.
splent product:up --dev
splent feature:test notes
With no level flag, unit, integration and functional tests run.
Running a feature’s tests
splent feature:test # every feature, default levels
splent feature:test notes --unit # one level
splent feature:test -k test_login -v # keyword filter, verbose
splent feature:test --e2e # E2E only, needs a running server
splent feature:test --load # load only, needs a running server
A feature your product does not declare is tested in a neutral app, and --neutral does the same for one it declares. --with FEATURE loads another feature from its working copy, so changes made to two features are tested together. See feature:test.
Running a product’s tests
splent product:test # the selected product
splent product:test --product app_a --product app_b --unit
It runs feature:test for each product, then the product’s own tests/, which run only without a level flag. See The product’s own tests.
Levels
| Flag | Level | Needs |
|---|---|---|
--unit |
Unit | Nothing |
--integration |
Integration | The test database |
--functional |
Functional | The test database and the app |
--e2e |
E2E (Selenium) | A running server |
--load |
Load (Locust) | A running server |
See also
- Test levels, how to write each kind of test
product:test, the product-level runner