Rust
Note: The
DATABASE_URL
must be present as environment variable for the database tests. TheDATABASE_URL
is automatically set using thebuild.rs
file if the build is not a release build.
Running all tests
cargo test
Running tests for a specific workspace member
cargo test -p item_producer
Vitest
Running unit/component tests
npm test
Playwright
Running End-to-End tests locally
npm run e2e
The following command is recommended when writing End-to-End tests.
npm run e2e -- --ui
To use Playwright codegen run the following command.
npm run codegen
Note:
npm run sqlx:prepare
runs thesrcs/scripts/sqlx_prepare.sh
script, which by default runscargo sqlx prepare
on all crates individually. Available options areall
,item_producer
,user_service
, andtauri
.
The docker images do not have access to a database with migrations applied during build-time. To ensure the docker image can be built, the json files under the .sqlx
directory must be up-to-date and committed.
The following script automatically sets-up each database and applies migrations using the build.rs
config defined within each crate and then prepares the .sqlx
cache directory.
docker compose up -d
npm run sqlx:prepare