How do I create integration tests in a workspace?

The structure of my project is more or less like this

The tests of my main (app) application work,
How do I invoke the other tests of the other workspaces?

├── app
│   ├── Cargo.toml
│   ├── src
│   └── tests <--- This works
├── domain
│   ├── Cargo.toml
│   └── src
├── infrastructure
│   ├── Cargo.toml
│   ├── src
│   └── test <--- I need to call these tests
├── Cargo.lock
├── Cargo.toml

I have seen that others create a new workspace to perform the integration tests, is there any other alternative ?

Generally, cargo test --workspace should run integration tests from all the crates of the workspace.

I created another crate in the workspace called integration tests, which has worked out well.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.