Skip to content

Conversation

@JelteF
Copy link

@JelteF JelteF commented Aug 31, 2017

I wanted setup, teardown and easy access to assert/require for benchmarks i'm working on. I think it might be useful for other people as well.

@JelteF
Copy link
Author

JelteF commented Aug 31, 2017

One thing I'm not sure about if we want to reuse the SetupTest, TearDownTest, BeforeTest and AfterTest interfaces or if new ones for Benchmark should be created. I kept it like this for now for sake of simplicity, but I don't mind adding the extra interfaces if it is decided that that improves clarity.
If the interfaces are reused the documentation for them should at least be updated to include that they are run before and after benchmarks as well.

@philtay
Copy link
Contributor

philtay commented Dec 21, 2017

This repo has been forked. Please feel free to open a new PR here: https://github.com/test-go/testify

suite.SetT(parentT)
}()

method.Func.Call([]reflect.Value{reflect.ValueOf(suite)})
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to measure the time of the function. You should to add b.RestartTim and then b.startTime and after the calling b.StopTime. Otherwise the result would be wrong

@dolmen dolmen added enhancement pkg-suite Change related to package testify/suite labels Jul 6, 2023
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.

4 participants