types

package
Version: v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2019 License: Apache-2.0 Imports: 5 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Participant

type Participant struct {
	Name string
}

func (*Participant) Validate added in v0.3.2

func (obj *Participant) Validate() error

type ParticipantToken

type ParticipantToken struct {
	SessionID     string
	ParticipantID string
}

func ParseParticipantToken

func ParseParticipantToken(token string) (*ParticipantToken, error)

func (*ParticipantToken) String

func (t *ParticipantToken) String() string

type Permission added in v0.3.0

type Permission string
const (
	PermissionNone              Permission = "none"
	PermissionUserAdd           Permission = "user.add"
	PermissionUserDelete        Permission = "user.delete"
	PermissionUserGrant         Permission = "user.grant"
	PermissionUserChpwd         Permission = "user.chpwd"
	PermissionUserList          Permission = "user.list"
	PermissionSessionStart      Permission = "session.start"
	PermissionSessionModify     Permission = "session.modify"
	PermissionSessionClose      Permission = "session.close"
	PermissionSessionView       Permission = "session.view"
	PermissionSessionContribute Permission = "session.contribute"
)

type TestPlan

type TestPlan struct {
	// ID is the globally unique ID of this testplan
	ID string
	// Name is the short description of the testplan
	Name string
	// Description is a long description
	Description string
	// Set lists the testsets that subselect testcases
	Testset []TestSet
	// Case lists the testcases of this plan
	Case []Testcase
}

func (*TestPlan) GetTestSet added in v0.4.3

func (tp *TestPlan) GetTestSet(id string) *TestSet

func (*TestPlan) SelectTestCases added in v0.4.3

func (tp *TestPlan) SelectTestCases(expr string) error

SelectTestCases removes all testcases from this test plan that do not match the expression

func (*TestPlan) Validate added in v0.3.2

func (obj *TestPlan) Validate() error

type TestRunState

type TestRunState string
const (
	Passed    TestRunState = "passed"
	Undecided TestRunState = "undecided"
	Failed    TestRunState = "Failed"
)

func WorseState

func WorseState(a TestRunState, b TestRunState) TestRunState

type TestRunStatus

type TestRunStatus struct {
	// ID is the globally unique ID of this test run
	ID string
	// Name is a short description of this run
	Name string
	// Plan ID is the ID of the testplan being executed
	PlanID string
	// Status lists the status for each testcase of the plan
	Case []TestcaseStatus
	// State is the overall test run state
	State TestRunState
	// Annotations are session metadata
	Annotations map[string]string
}

func (*TestRunStatus) ToTestplan added in v0.4.0

func (s *TestRunStatus) ToTestplan() TestPlan

func (*TestRunStatus) Validate added in v0.3.2

func (obj *TestRunStatus) Validate() error

type TestSet added in v0.4.3

type TestSet struct {
	// ID is the unique ID of this testset
	ID string
	// Name is the short description of the testset
	Name string
	// Expression is the CEXL expression for matching testcases
	Expression string
}

type Testcase

type Testcase struct {
	// ID of the testcase. Must be unique within the test suite.
	ID string
	// Name is the short description of the testcase
	Name string
	// Groups helps organize testcases
	Group string
	// Description is a long description
	Description string
	// Steps lists the individual steps a tester should perform
	Steps string
	// If true this testcase must pass for the suite to pass
	MustPass bool
	// MinTesterCount is the number of participants who need to run this test
	MinTesterCount uint32
	// Annotations are testcase metadata
	Annotations map[string]string `json:",omitempty"`
}

func (Testcase) Get added in v0.4.3

func (tc Testcase) Get(name string) (interface{}, error)

Get implements govaluate.Parameters interface for the expression evaluation

func (*Testcase) Validate added in v0.3.2

func (obj *Testcase) Validate() error

type TestcaseRunResult

type TestcaseRunResult struct {
	// Participant who contributed this result
	Participant Participant
	// State denotes the success of a testcase
	State TestRunState
	// Comment is free text entered by the participant
	Comment string
}

func (*TestcaseRunResult) Validate added in v0.3.2

func (obj *TestcaseRunResult) Validate() error

type TestcaseStatus

type TestcaseStatus struct {
	// The testcase this run concerns
	Case Testcase
	// Claims mark testers who want to run a testcase
	Claim []Participant
	// Runs are completed testcase executions
	Result []TestcaseRunResult
	// State is the overall testcase success state
	State TestRunState
}

func (*TestcaseStatus) Validate added in v0.3.2

func (obj *TestcaseStatus) Validate() error

Jump to

Keyboard shortcuts

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