foundry-rs / foundry-rs/foundry

feat(forge test) option to list summary table only

Open
#9,307 2 comments 0 reactions 0 assignees View on GitHub
C-forge Cmd-forge-test T-feature T-to-discuss
Dominant language
Rust
Stars
10.6k
Forks
2.6k
Avg merge
18h 20m
Merged PRs (30d)
510

Description

### Component

Forge

### Describe the feature you would like

Motivation: Many tests fail when migrating from OZ 4 to OZ 5, esp. when you have hundreds of tests. One needs to see and report on the volume to be fixed.

The `forge test --summary --detailed` gives a nice overview, but the table is burned within the rest of the output.

I propose to have the flag `--summaryonly` , which would act similarly to ` --summary --detailed`, but would output only the table and the general stat `Encountered a total of xxx failing tests, zzz tests succeeded`

Current workaround is:
`forge test --summary --detailed | awk '/Test Summary:/,/----╯/'`

But that loses coloring.

I assume there might be some other workaround, I welcome any comments on this.

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.