foundry
foundry copied to clipboard
feat(`invariants`): real-time runs counter
Motivation
proposed way to handle #585
Solution
- add a global invariant reporter to collect test runs and completed runs
- display in terminal on thread that polls data progress each 100ms
- reporter is enabled if
show_progress
option is set to true (or run with env varFOUNDRY_INVARIANT_SHOW_PROGRESS=true forge test
)
just noticed https://github.com/foundry-rs/foundry/issues/3607 I think the approach of global invariant reporter could be a good foundation of adding such, wdyt?
Have you tested this in the context of multiple other unit and fuzz tests? It looks like it will constantly get "overwritten" by the other test results that stream in, so I don't think this is right.
This is something I've thought about before, and I think I'll post a proposal as an issue soon and we'll discuss this internally soon.
Also I would prefer you follow conventional commits, at least for PR names :smile_cat: (instead of feat abc (issue)
you could write `feat(abc): do this thing)
Have you tested this in the context of multiple other unit and fuzz tests? It looks like it will constantly get "overwritten" by the other test results that stream in, so I don't think this is right.
yep, I tested it, it is basically following the flow of results, see below
This is something I've thought about before, and I think I'll post a proposal as an issue soon and we'll discuss this internally soon.
Also I would prefer you follow conventional commits, at least for PR names 😸 (instead of
feat abc (issue)
you could write `feat(abc): do this thing)
TIL, will do!
Yeah you can see the spinner gets interleaved with the other results, I'd prefer we hold off on this for now.
That's a much better title, thanks!
A different approach using indifcatif
library
retired in favor of #7914