Skip to content
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

Feature Request: ScenarioFn uses common testing interface #278

Open
sirockin opened this issue Sep 3, 2024 · 0 comments · May be fixed by #286
Open

Feature Request: ScenarioFn uses common testing interface #278

sirockin opened this issue Sep 3, 2024 · 0 comments · May be fixed by #286

Comments

@sirockin
Copy link

sirockin commented Sep 3, 2024

The f1. T type is almost compatible with the testing.TB interface which exposes the common methods of testing.T, testing.B and testing.F.

Making f1.T completely compatible with testing.TB or exposing a similar interface with a subset of the testing.TB methods (and amending ScenarioFn to use this interface) would facilitate reusing the same test implementation as standard tests or f1 load tests as well as being a generally good practice.

The changes necessary to f1.T to achieve compatibility with testing.TB would be as follows:

testing.TB method f1.T method Changes Required
Error(args ...any) func (t *T) Error(err error) backward compatible signature change
Fatal(args ...any) func (t *T) Fatal(err error) backward compatible signature change
Helper() (not implemented) stub implementation
Setenv(key, value string) (not implemented) stub implementation
Skip(args ...any) (not implemented) stub implementation
SkipNow() (not implemented) stub implementation
Skipf(format string, args ...any) (not implemented) stub implementation
Skipped() bool (not implemented) stub implementation
TempDir() string (not implemented) stub implementation
@sirockin sirockin changed the title Feature Request: Compatibility with testing.TB Feature Request: ScenarioFn uses common testing interface Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant