What do you want to see?
Hello,
we have implemented a custom struct that embeds *testing.T and adds some internal functionality, but does not change the interface.
Our custom struct looks something like this:
type Custom struct {
*testing.T
}
func (t *Custom) Errorf(format string, args ...any) {
// Some custom functionality here
t.T.Errorf(format, args...)
}
Using that custom struct with e2e-framework, however, is a bit difficult because funcs like Test in the Environment interface (see here) require a concrete *testing.T type instead of an interface.
Would it be possible to accept an interface instead, like testing.TB? Are there specific reasons why the concrete type was chosen instead of an interface? For reference, testify even has an own interface, which makes using custom wrappers like ours straightforward to use.
Thank you!
Extra Labels
No response
What do you want to see?
Hello,
we have implemented a custom struct that embeds
*testing.Tand adds some internal functionality, but does not change the interface.Our custom struct looks something like this:
Using that custom struct with e2e-framework, however, is a bit difficult because funcs like
Testin theEnvironmentinterface (see here) require a concrete*testing.Ttype instead of an interface.Would it be possible to accept an interface instead, like
testing.TB? Are there specific reasons why the concrete type was chosen instead of an interface? For reference, testify even has an own interface, which makes using custom wrappers like ours straightforward to use.Thank you!
Extra Labels
No response