Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests : improve readme to add instructions to list tests #250

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $ sudo apt install python3
- The guest image must enable ssh server with password-based authentication for `root` user.
The root user password must be `123456`

### Run tests with pytest
### Run tests with tox/pytest

Go to the `tests` folder.

Expand Down Expand Up @@ -66,6 +66,27 @@ Please note that the performance tests can take a long time (order of magnitude
$ sudo -E tox -e test_all
```

To list tests without running:

```
sudo -E tox -e collect_tests -- EXPRESSION
```

`EXPRESSION` is the expression provided to the argument `-k` of `pytest`.
For more details on its format, you can refer to `pytest` help page.

For example:

```
sudo -E tox -e collect_tests -- 'test_guest or test_stress'
```

To run tests matching an expression:

```
sudo -E tox -e test_specify -- EXPRESSION
```

### Run tests with checkbox:

Go to the `tests` folder.
Expand Down