Documentation ¶
Overview ¶
Package tests contains integration tests that run k6 commands, and interact with standard I/O streams. They're the highest level tests we have, just below E2E tests that execute the k6 binary. Since they initialize all internal k6 components similarly to how a user would, they're very useful, but also very expensive to run.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GlobalTestState ¶
type GlobalTestState struct { *state.GlobalState Cancel func() Stdout, Stderr *bytes.Buffer LoggerHook *testutils.SimpleLogrusHook Cwd string ExpectedExitCode int }
GlobalTestState is a wrapper around GlobalState for use in tests.
func NewGlobalTestState ¶
func NewGlobalTestState(t *testing.T) *GlobalTestState
NewGlobalTestState returns an initialized GlobalTestState, mocking all GlobalState fields for use in tests.
Click to show internal directories.
Click to hide internal directories.