Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jaltmayerpizzorno authored Jun 4, 2024
1 parent 2b44b7a commit c09cbd0
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ $ coverup --source-dir src/mymod --tests-dir tests
CoverUp then creates tests named `test_coverup_N.py`, where `N` is a number, under the `tests` directory.

### Example

Here we have CoverUp create additional tests for the popular package [Flask](https://flask.palletsprojects.com/):
```
$ coverup --source-dir src/flask --tests-dir tests --disable-polluting --no-isolate-tests
Expand All @@ -70,6 +69,19 @@ to fail and disabled it.
That test remains as `disabled_test_coverup_19.py`, where it can be reviewed for the cause
and possibly re-added to the suite.

### Avoiding flaky tests
While evaluating each newly generated test, CoverUp executes it a number of times in an
attempt to detect any flaky tests; that can be adjusted with the `--repeat-tests` and
`--no-repeat-tests` options.
If CoverUp detects that a newly generated test is flaky, it prompts the LLM for a correction.

### Test pollution and isolation
CoverUp only adds tests to the suite that, when run by themselves, pass and increase coverage.
However, it is possible for one test to "pollute" the state, causing other tests to fail.
By default, CoverUp uses the [pytest-cleanslate](https://github.com/plasma-umass/pytest-cleanslate)
plugin to isolate tests, working around any (in-memory) test pollution; that can be disabled by
passing in the `--no-isolate-tests` option.

### Running CoverUp with Docker

To evaluate the tests generated by the LLM, CoverUp must execute them.
Expand Down

0 comments on commit c09cbd0

Please sign in to comment.