https://github.com/devlooped/dotnet-retest
https://github.com/devlooped/dotnet-retest
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/devlooped/dotnet-retest
- Owner: devlooped
- License: mit
- Created: 2024-07-15T21:51:38.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-06-27T00:10:59.000Z (12 months ago)
- Last Synced: 2025-06-27T01:21:34.106Z (12 months ago)
- Language: C#
- Size: 171 KB
- Stars: 22
- Watchers: 1
- Forks: 3
- Open Issues: 14
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- License: license.txt
Awesome Lists containing this project
README
 dotnet retest
============
[](https://www.nuget.org/packages/dotnet-retest)
[](https://www.nuget.org/packages/dotnet-retest)
[](https://github.com//devlooped/dotnet-retest/blob/main/license.txt)
[](https://github.com/devlooped/dotnet-retest/actions)
Runs `dotnet test` with retries for failed tests automatically, and pretty-prints aggregated
test results, integrating also with GitHub PR comments just like [dotnet-trx](https://github.com/devlooped/dotnet-trx).

When running locally, it provides live progress on each run:

and timing and outcome for each attempt:

Typical usage: `dotnet retest [OPTIONS] [-- [dotnet test options]]` (with optional `--attempts` which defaults to `3`):
```yml
- name: 🧪 test
run: |
dotnet tool update -g dotnet-retest
dotnet retest -- --no-build [other test options and args]
```
PR comment integration:

> NOTE: this behavior is triggered by the presence of the `GITHUB_REF_NAME` and `CI` environment variables.
```shell
USAGE:
dotnet retest [OPTIONS] [-- [dotnet test options]]
OPTIONS:
DEFAULT
-h, --help Prints help information
--version Prints version information
--retries 3 Maximum retries when re-running failed tests
--no-summary Whether to emit a summary to console/GitHub
--output Include test output in report
-v, --verbosity Quiet Output display verbosity:
- quiet: only failed tests are displayed
- normal: failed and skipped tests are
displayed
- verbose: failed, skipped and passed tests
are displayed
--gh-comment True Report as GitHub PR comment
--gh-summary True Report as GitHub step summary
```
> NOTE: rendering the passed tests requires `verbose` verbosity, since typically
> you'll just want to see the failed tests in the report, especially in projects with
> large number of tests.
Install:
```shell
dotnet tool install -g dotnet-retest
```
Update:
```shell
dotnet tool update -g dotnet-retest
```
# Sponsors
[](https://github.com/clarius)
[](https://github.com/MFB-Technologies-Inc)
[](https://github.com/torutek-gh)
[](https://github.com/drivenet)
[](https://github.com/Keflon)
[](https://github.com/tbolon)
[](https://github.com/kfrancis)
[](https://github.com/twenzel)
[](https://github.com/unoplatform)
[](https://github.com/dansiegel)
[](https://github.com/rbnswartz)
[](https://github.com/jfoshee)
[](https://github.com/Mrxx99)
[](https://github.com/eajhnsn1)
[](https://github.com/IxTechnologies)
[](https://github.com/davidjenni)
[](https://github.com/Jonathan-Hickey)
[](https://github.com/akunzai)
[](https://github.com/jakobt)
[](https://github.com/tinohager)
[](https://github.com/KenBonny)
[](https://github.com/SimonCropp)
[](https://github.com/agileworks-eu)
[](https://github.com/sorahex)
[](https://github.com/arsdragonfly)
[](https://github.com/vezel-dev)
[](https://github.com/ChilliCream)
[](https://github.com/4OTC)
[](https://github.com/v-limo)
[](https://github.com/jordansjones)
[](https://github.com/DominicSchell)
[](https://github.com/jkingry)
[](https://github.com/sponsors/devlooped)
Â
[Learn more about GitHub Sponsors](https://github.com/sponsors)