runner

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2021 License: MIT Imports: 30 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Screenshot

func Screenshot(targetFile string) chromedp.Action

Screenshot captures a screenshot and saves it to the given filename.

func SetTestContextData added in v0.0.4

func SetTestContextData(ctx context.Context, testContext TestContext) context.Context

func Suites

func Suites(ctx context.Context, url string, suites TestSuites, opts Options)

Suites runs the given suites.

Types

type Options

type Options struct {
	SortSuites bool
	SortTests  bool
	Screenshot ScreenshotOptions
	LogError   bool
	LogWarning bool
	LogInfo    bool
	LogConsole bool
}

Options enabled to configure the run.

type PostProcessingOptions added in v0.0.2

type PostProcessingOptions struct {
	OutDir       string
	RemoveImages bool
	CreateGIF    bool
}

type ScreenshotOptions added in v0.0.2

type ScreenshotOptions struct {
	OutDir         string
	OnFailure      bool
	PostProcessing PostProcessingOptions
}

ScreenshotOptions controls screenshot behavior.

type TestCase

type TestCase func(ctx context.Context, url string) error

TestCase defines a function that runs a test.

type TestContext added in v0.0.2

type TestContext struct {
	ID                int
	SuiteName         string
	TestName          string
	GroupName         string
	ScreenshotOptions ScreenshotOptions
	Error             string
}

func MustGetTestContext added in v0.0.3

func MustGetTestContext(ctx context.Context) TestContext

type TestSuite

type TestSuite map[string]TestCase

TestSuite is a dictionary of TestCase where the key is the test case name.

type TestSuites

type TestSuites map[string]TestSuite

TestSuites is a dictionary of TestSuite where the key is the test runSuite name.

type Title added in v0.0.3

type Title struct {
	SuiteName  string
	CaseName   string
	Error      string
	ActionName string
	Step       int
}

Jump to

Keyboard shortcuts

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