Skip to content

Commit

Permalink
fix: #696 Small issue and Black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
robbrad committed May 14, 2024
1 parent 46976d5 commit ae961f1
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,23 @@ file.
Based on the [input.json](https://github.com/robbrad/UKBinCollectionData/blob/master/uk_bin_collection/tests/input.json),
this does an actual live run against the council's site and validates if the returned data is JSON and conforms to the common format [JSON Schema](https://github.com/robbrad/UKBinCollectionData/tree/master/uk_bin_collection/tests/output.schema).

By default if the council is a Selenium based Council it will not run in headless mode. If you set an environment variable called `HEADLESS=True` it will run in headless. The [GitHub runner](https://github.com/robbrad/UKBinCollectionData/blob/master/.github/workflows/behave.yml#L76) is set to do this.
By default if the council is a Selenium based council it will run in headless mode. If you pass `--headless=False` to pytest (possible in VS Code via the workspace settings.json useful for debugging code) It will run in headless.

```
{
"python.testing.pytestArgs": [
"uk_bin_collection",
"--headless=True"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}
```

It is also possible to run
```
poetry run pytest uk_bin_collection/tests/step_defs/ -k "Council_Name" --headless=False
```

#### Running the Behave tests for all councils
```commandline
Expand Down

0 comments on commit ae961f1

Please sign in to comment.