provider

package
v0.0.0-...-f702ca3 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllureForwardFull

type AllureForwardFull interface {
	AllureForward
	SystemLabels
}

type AllureSteps

type AllureSteps interface {
	Step(step *allure.Step)
	NewStep(stepName string, params ...*allure.Parameter)
}

type Asserts

type Asserts interface {
	Exactly(expected interface{}, actual interface{}, msgAndArgs ...interface{})
	Same(expected interface{}, actual interface{}, msgAndArgs ...interface{})
	NotSame(expected interface{}, actual interface{}, msgAndArgs ...interface{})
	Equal(expected interface{}, actual interface{}, msgAndArgs ...interface{})
	NotEqual(expected interface{}, actual interface{}, msgAndArgs ...interface{})
	EqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{})
	NotEqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{})
	Error(err error, msgAndArgs ...interface{})
	NoError(err error, msgAndArgs ...interface{})
	EqualError(theError error, errString string, msgAndArgs ...interface{})
	ErrorIs(err error, target error, msgAndArgs ...interface{})
	ErrorAs(err error, target interface{}, msgAndArgs ...interface{})
	NotNil(object interface{}, msgAndArgs ...interface{})
	Nil(object interface{}, msgAndArgs ...interface{})
	Len(object interface{}, length int, msgAndArgs ...interface{})
	NotContains(s interface{}, contains interface{}, msgAndArgs ...interface{})
	Contains(s interface{}, contains interface{}, msgAndArgs ...interface{})
	Greater(e1 interface{}, e2 interface{}, msgAndArgs ...interface{})
	GreaterOrEqual(e1 interface{}, e2 interface{}, msgAndArgs ...interface{})
	Less(e1 interface{}, e2 interface{}, msgAndArgs ...interface{})
	LessOrEqual(e1 interface{}, e2 interface{}, msgAndArgs ...interface{})
	Implements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{})
	Empty(object interface{}, msgAndArgs ...interface{})
	NotEmpty(object interface{}, msgAndArgs ...interface{})
	WithinDuration(expected, actual time.Time, delta time.Duration, msgAndArgs ...interface{})
	JSONEq(expected, actual string, msgAndArgs ...interface{})
	JSONContains(expected, actual string, msgAndArgs ...interface{})
	Subset(list, subset interface{}, msgAndArgs ...interface{})
	NotSubset(list, subset interface{}, msgAndArgs ...interface{})
	IsType(expectedType interface{}, object interface{}, msgAndArgs ...interface{})
	True(value bool, msgAndArgs ...interface{})
	False(value bool, msgAndArgs ...interface{})
	Regexp(rx interface{}, str interface{}, msgAndArgs ...interface{})
	ElementsMatch(listA interface{}, listB interface{}, msgAndArgs ...interface{})
	DirExists(path string, msgAndArgs ...interface{})
	Condition(condition assert.Comparison, msgAndArgs ...interface{})
	Zero(i interface{}, msgAndArgs ...interface{})
	NotZero(i interface{}, msgAndArgs ...interface{})
	InDelta(expected, actual interface{}, delta float64, msgAndArgs ...interface{})
}

Asserts ...

type Attachments

type Attachments interface {
	WithAttachments(attachment ...*allure.Attachment)
	WithNewAttachment(name string, mimeType allure.MimeType, content []byte)
}

type DescriptionFields

type DescriptionFields interface {
	Title(args ...interface{})
	Titlef(format string, args ...interface{})
	Description(args ...interface{})
	Descriptionf(format string, args ...interface{})
	Stage(args ...interface{})
	Stagef(format string, args ...interface{})
}

type DescriptionLabels

type DescriptionLabels interface {
	ID(value string)
	AllureID(value string)
	Epic(value string)
	Layer(value string)
	Feature(value string)
	Story(value string)
	Severity(severityType allure.SeverityType)
	Tag(value string)
	Tags(values ...string)
	Owner(value string)
	Lead(value string)
	Label(label *allure.Label)
	Labels(labels ...*allure.Label)
	ReplaceLabel(label *allure.Label)
}

type ExecutionContext

type ExecutionContext interface {
	AddStep(step *allure.Step)
	AddAttachments(attachment ...*allure.Attachment)
	GetName() string
}
type Links interface {
	SetIssue(issue string)
	SetTestCase(testCase string)
	Link(link *allure.Link)
	TmsLink(tmsCase string)
	TmsLinks(tmsCases ...string)
}

type Parameters

type Parameters interface {
	WithParameters(params ...*allure.Parameter)
	WithNewParameters(kv ...interface{})
}

type Provider

type Provider interface {
	AllureForwardFull

	GetResult() *allure.Result
	UpdateResultStatus(msg string, trace string)
	StopResult(status allure.Status)

	SetTestMeta(meta TestMeta)
	GetTestMeta() TestMeta
	GetSuiteMeta() SuiteMeta
	ExecutionContext() ExecutionContext

	TestContext()
	BeforeEachContext()
	AfterEachContext()
	BeforeAllContext()
	AfterAllContext()

	NewTest(testName, packageName string, tags ...string)
	FinishTest() error
}

type StepCtx

type StepCtx interface {
	Step(step *allure.Step)
	NewStep(stepName string, parameters ...*allure.Parameter)
	WithNewStep(stepName string, step func(sCtx StepCtx), params ...*allure.Parameter)
	WithNewAsyncStep(stepName string, step func(sCtx StepCtx), params ...*allure.Parameter)

	WithParameters(parameters ...*allure.Parameter)
	WithNewParameters(kv ...interface{})

	WithAttachments(attachment ...*allure.Attachment)
	WithNewAttachment(name string, mimeType allure.MimeType, content []byte)

	Assert() Asserts
	Require() Asserts

	LogStep(args ...interface{})
	LogfStep(format string, args ...interface{})
	CurrentStep() *allure.Step

	Broken()
	BrokenNow()

	Fail()
	FailNow()
	Log(args ...interface{})
	Logf(format string, args ...interface{})
	Error(args ...interface{})
	Errorf(format string, args ...interface{})
	Break(args ...interface{})
	Breakf(format string, args ...interface{})
	Name() string
}

type SuiteLabels

type SuiteLabels interface {
	AddSuiteLabel(value string)
	AddSubSuite(value string)
	AddParentSuite(value string)
}

type SuiteMeta

type SuiteMeta interface {
	GetPackageName() string
	GetRunner() string
	GetSuiteName() string
	GetParentSuite() string
	GetSuiteFullName() string
	GetContainer() *allure.Container

	SetBeforeAll(func(T))
	SetAfterAll(func(T))
	GetBeforeAll() func(T)
	GetAfterAll() func(T)
}

type SystemLabels

type SystemLabels interface {
	Package(value string)
	FrameWork(value string)
	Host(value string)
	Thread(value string)
	Language(value string)
}

type T

type T interface {
	testing.TB
	AllureForward

	Parallel()

	RealT() TestingT
	XSkip()
	Break(args ...interface{})
	Breakf(format string, args ...interface{})
	Broken()
	BrokenNow()
	SkipOnPrint()
	Assert() Asserts
	Require() Asserts
	Run(testName string, testBody func(T), tags ...string) *allure.Result

	LogStep(args ...interface{})
	LogfStep(format string, args ...interface{})
	WithNewStep(stepName string, step func(sCtx StepCtx), params ...*allure.Parameter)
	WithNewAsyncStep(stepName string, step func(sCtx StepCtx), params ...*allure.Parameter)
	WithTestSetup(setup func(T))
	WithTestTeardown(teardown func(T))
}

type TestMeta

type TestMeta interface {
	GetResult() *allure.Result
	SetResult(result *allure.Result)

	GetContainer() *allure.Container

	SetBeforeEach(hook func(T))
	GetBeforeEach() func(T)
	SetAfterEach(hook func(T))
	GetAfterEach() func(T)
}

type TestingT

type TestingT interface {
	testing.TB
	Parallel()
	Run(testName string, testBody func(t *testing.T)) bool
}

Jump to

Keyboard shortcuts

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