Skip to content

Commit

Permalink
tests : improve readme to add instructions to list tests (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
hector-cao authored Oct 23, 2024
1 parent 6c45975 commit 8524eb2
Showing 1 changed file with 22 additions and 1 deletion.
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

0 comments on commit 8524eb2

Please sign in to comment.