runner

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2020 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 SetTestContext added in v0.0.2

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

func Suites

func Suites(url string, suites TestSuites, opts Options)

Suites runs the given suites.

Types

type Options

type Options struct {
	SortSuites bool
	SortTests  bool
	Screenshot ScreenshotOptions
}

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
	BeforeTestCase bool
	AfterTestCase  bool
	BeforeGroup    bool
	AfterGroup     bool
	BeforeAction   bool
	AfterAction    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
	ActionName        string
	TestStep          int
	ScreenshotOptions ScreenshotOptions
}

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
	GroupName  string
	ActionName string
	Step       int
}

Jump to

Keyboard shortcuts

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