Skip to content

suite: add support for -testify.c #1750

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renzoarreaza
Copy link
Contributor

@renzoarreaza renzoarreaza commented May 25, 2025

Summary

Add testify's own "count" argument -testify.c to run tests multiple times without rerunning Setup/TeardownSuite

Changes

I've added a new (uint) flag to the top of suite/suite.go.
And I add the same InternalTest object that is created multiple times to the tests slice.

Motivation

The first change allows tests to be repeated multiple times. Using go test's -count option results in the Setup/TeardownSuite also running multiple times. This is especially valuable when you have a SetupSuite that takes a long time.

Related

Repeat tests without rerunning Setup/TeardownSuite
@dolmen dolmen added enhancement pkg-suite Change related to package testify/suite labels May 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement pkg-suite Change related to package testify/suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants