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
The test above will be run using the Firefox browser and this mark takes precedence over the CLI argument `--use-browser`, if it is passed.
92
+
The test above will be run using the Firefox browser and this mark takes precedence over the CLI argument `--use-browser`, if it is passed.
93
+
94
+
## Using `pytest` parametrize option to repeat test on different browsers
95
+
96
+
It's useful to use the powers of `pytest` framework to handle situations where the specific test case should be run against a variety of different browsers. A way to make it works it's by using `pytest.mark.parametrize` fixture, as the example below:
The way the example above works is by only applying:
110
+
- an _ID_: to be displayed on the pytest output;
111
+
- the custom `FORCE_BROWSER` mark: to force the use of the specified browser.
112
+
113
+
## Using containers to run tests
114
+
115
+
To rapidly set a development environment, using Docker to run containers is a valid alternative. Documentation for `docker-selenium` is set on the [project official repository](https://github.com/SeleniumHQ/docker-selenium) and it might be a good idea to take some time to read it.
116
+
117
+
The first steps are condensed on this [Makefile](Makefile), and you could start with the `make help` command to see the basics to: put containers UP or DOWN with Docker, then execute the tests on this infrastructure. All containers configuration are disposed on [compose.yaml](containers/compose.yaml)
118
+
119
+
```sh
120
+
make help
121
+
# > These are all the avalaible commands ...
122
+
123
+
make se-docker-up # starts the docker containers set by containers/compose.yaml file
124
+
125
+
make se-docker-run-tests #Running tests for Firefox, Chrome and Edge browsers from docker containers
126
+
127
+
make se-docker-down # terminates the docker containers set by containers/compose.yaml file
0 commit comments