MCPcopy
hub / github.com/stretchr/testify / SuiteTester

Struct SuiteTester

suite/suite_test.go:154–181  ·  view source on GitHub ↗

This suite is intended to store values to make sure that only testing-suite-related methods are run. It's also a fully functional example of a testing suite, using setup/teardown methods and a helper method that is ignored by testify. To make this look more like a real world example, all tests in

Source from the content-addressed store, hash-verified

152// more like a real world example, all tests in the suite perform some
153// type of assertion.
154type SuiteTester struct {
155 // Include our basic suite logic.
156 Suite
157
158 // Keep counts of how many times each method is run.
159 SetupSuiteRunCount int
160 TearDownSuiteRunCount int
161 SetupTestRunCount int
162 TearDownTestRunCount int
163 TestOneRunCount int
164 TestTwoRunCount int
165 TestSubtestRunCount int
166 NonTestMethodRunCount int
167 SetupSubTestRunCount int
168 TearDownSubTestRunCount int
169
170 SetupSubTestNames []string
171 TearDownSubTestNames []string
172
173 SuiteNameBefore []string
174 TestNameBefore []string
175
176 SuiteNameAfter []string
177 TestNameAfter []string
178
179 TimeBefore []time.Time
180 TimeAfter []time.Time
181}
182
183// The SetupSuite method will be run by testify once, at the very
184// start of the testing suite, before any tests are run.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected