Closed jirikuncar closed 3 years ago
Thanks for creating your first issue! We are thankful for your help
If you use t.Log
functions, it should already group the output under the right test.
What's your use case?
@sagikazarmark tracing and VCR recording. The work around with t.(*testing.T))
is working but it's not really nice.
exposing the t
to the context comes back. Again. But, it will break the backwards compatibility because we'll have to pass the t
to the NewContext()
function https://github.com/go-bdd/gobdd/blob/master/context.go#L13.
What I can suggest is to add a new function to the context and call it ctx.T()
or ctx.Logger()
that will return an interface with logging capabilities.
Are there any other use cases where the testing.T
will be useful?
@bkielbasa maybe t.Cleanup()
in Go 1.14?
you have Before and AfterSuite functions. Do you need more than that?
What's more, doesn't the standard output fit your need? Could you provide an example?
This task is quite old now. I think I'll close it for now but don't hesitate to reopen it if needed :)
Is your feature request related to a problem? Please describe. I would like to be able to use the step name for logging and tracing.
Describe the solution you'd like Add
Name() string
toStepTest
.Describe alternatives you've considered
t.(*testing.T))
Additional context TBD