You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tests for individual endpoints can be executed using individual markers. For example:
99
+
Some tests are grouped using markers. You can include/exclude groups with the `-m` flag:
98
100
99
101
```shell
100
102
$ pytest -m log_in
103
+
$ pytest -m "not imms_api and not accessibility"
101
104
```
105
+
#### Parallel test execution
102
106
103
-
#### Tracing
104
-
105
-
There's an option available to run tests with tracing, allowing the test to be
106
-
replayed in the Trace Viewer.
107
+
This repository uses [pytest-xdist] to run test modules in parallel. The number of available workers is equal to the number of CPUs that your system has. By default, when running tests locally, all available workers will be used when running multiple test modules. This behaviour can be configured with the `-n` flag.
While the tests are running, results are stored in `allure-results` which can
@@ -123,18 +126,25 @@ $ npx allure-commandline open
123
126
124
127
### Linting and formatting
125
128
126
-
Ruff is used as a linting and formatting tool in this repo:
129
+
[Ruff] is used as a linting and formatting tool in this repo:
127
130
128
131
```shell
129
132
$ ruff format
130
133
$ ruff check --fix
131
134
```
132
135
136
+
[Ruff]:https://github.com/astral-sh/ruff
137
+
138
+
### Playwright Page Object Model
139
+
140
+
The Playwright [Page Object Model] (or POM) approach is taken when developing this repository. Each page/wizard in Mavis should have its own Page object, storing all appropriate locators and methods. When multiple pages use the same locators/methods, a component should be created that extracts these. Then page objects can access this functionality via the component. See `mavis/test/pages/header_component.py` and its usages for an example.
Further details on the scope and approach of the automation are on the [NHSD Confluence page](https://nhsd-confluence.digital.nhs.uk/pages/viewpage.action?spaceKey=Vacc&title=Mavis+Test+Automation).
0 commit comments