Skip to content

Feature Request: ScenarioFn uses common testing interface #278

@sirockin

Description

@sirockin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions