types

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2018 License: Apache-2.0 Imports: 3 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateParticipant

func ValidateParticipant(obj *Participant) error

func ValidateTestPlan

func ValidateTestPlan(obj *TestPlan) error

func ValidateTestRunStatus

func ValidateTestRunStatus(obj *TestRunStatus) error

func ValidateTestcase

func ValidateTestcase(obj *Testcase) error

func ValidateTestcaseRunResult

func ValidateTestcaseRunResult(obj *TestcaseRunResult) error

func ValidateTestcaseStatus

func ValidateTestcaseStatus(obj *TestcaseStatus) error

Types

type Participant

type Participant struct {
	Name string `validate:"required"`
}

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 TestPlan

type TestPlan struct {
	// ID is the globally unique ID of this testplan
	ID string `validate:"required"`
	// Name is the short description of the testplan
	Name string `validate:"required"`
	// Description is a long description
	Description string `validate:"required"`
	// Case lists the testcases of this plan
	Case []Testcase
}

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 `validate:"required"`
	// Name is a short description of this run
	Name string `validate:"required"`
	// Plan ID is the ID of the testplan being executed
	PlanID string `validate:"required"`
	// Status lists the status for each testcase of the plan
	Status []TestcaseStatus
	// State is the overall test run state
	State TestRunState `validate:"required"`
}

type Testcase

type Testcase struct {
	// ID of the testcase. Must be unique within the test suite.
	ID string `validate:"required" gorm:"primary_key"`
	// Name is the short description of the testcase
	Name string `validate:"required"`
	// Groups helps organize testcases
	Group string `validate:"required"`
	// 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
}

type TestcaseRunResult

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

type TestcaseStatus

type TestcaseStatus struct {
	// The testcase this run concerns
	Case Testcase `validate:"required"`
	// 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 `validate:"required"`
}

Jump to

Keyboard shortcuts

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