tests

package
v0.0.0-...-2fc1e16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2023 License: AGPL-3.0 Imports: 20 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func Main

func Main(m *testing.M)

Main is a TestMain function that can be imported by other test packages that want to use the blocking transport and other features useful for integration tests.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL