internal

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TestPlanStatusWarning = "warning"
	TestPlanStatusQueuing = "queuing"
	TestPlanStatuWaiting  = "waiting"
	TestPlanStatusRunning = "running"
	TestPlanStatusPassed  = "passed"
	TestPlanStatusFailed  = "failed"
)
View Source
const (
	ExitCodeOk    int = 0
	ExitCodeError int = 1
)
View Source
const (
	VersionCommandName  = "version"
	ScenarioCommandName = "scenario"
	ResultCommandName   = "result"
	RunCommandName      = "run"
)
View Source
const AccessTokenEnvName = "AUTIFY_PERSONAL_ACCESS_TOKEN"

Variables

This section is empty.

Functions

func CheckAccessToken

func CheckAccessToken() bool

func GetAccessToken

func GetAccessToken() string

func RequireCredential

func RequireCredential() bool

Types

type Autify

type Autify struct {
	// contains filtered or unexported fields
}

func NewAutfiy

func NewAutfiy(accessToken string, options ...AutifyOption) *Autify

func (*Autify) FetchResult

func (a *Autify) FetchResult(projectId, resultId int) (*TestPlanResult, error)

func (*Autify) FetchScenario

func (a *Autify) FetchScenario(projectId, scenarioId int) (*Scenario, error)

func (*Autify) RunTestPlan

func (a *Autify) RunTestPlan(planId int) (*RunResult, error)

type AutifyOption

type AutifyOption func(a *Autify)

func AutifyOptionBaseUrl

func AutifyOptionBaseUrl(baseUrl string) AutifyOption

func AutifyOptionHTTPClient

func AutifyOptionHTTPClient(c *http.Client) AutifyOption

type ResultCommand

type ResultCommand struct{}

func (*ResultCommand) Help

func (r *ResultCommand) Help() string

func (*ResultCommand) Run

func (r *ResultCommand) Run(args []string) int

func (*ResultCommand) Synopsis

func (r *ResultCommand) Synopsis() string

type RunCommand

type RunCommand struct{}

func (*RunCommand) Help

func (r *RunCommand) Help() string

func (*RunCommand) Run

func (r *RunCommand) Run(args []string) int

func (*RunCommand) Synopsis

func (r *RunCommand) Synopsis() string

type RunResult

type RunResult struct {
	TestPlanResultId string `json:"id"`
	Type             string `json:"type"`
	Attributes       struct {
		Id int `json:"id"`
	} `json:"attributes"`
}

type RuntTestPlanResponse

type RuntTestPlanResponse struct {
	Data RunResult `json:"data"`
}

type Scenario

type Scenario struct {
	Id        int       `json:"id"`
	Name      string    `json:"name"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type ScenarioCommand

type ScenarioCommand struct{}

func (*ScenarioCommand) Help

func (s *ScenarioCommand) Help() string

func (*ScenarioCommand) Run

func (s *ScenarioCommand) Run(args []string) int

func (*ScenarioCommand) Synopsis

func (s *ScenarioCommand) Synopsis() string

type TestPlan

type TestPlan struct {
	Id        int       `json:"id"`
	Name      string    `json:"name"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type TestPlanResult

type TestPlanResult struct {
	Id         int       `json:"id"`
	Status     string    `json:"status"`
	Duration   int       `json:"duration"`
	StartedAt  time.Time `json:"started_at"`
	FinishedAt time.Time `json:"finished_at"`
	CreatedAt  time.Time `json:"created_at"`
	UpdatedAt  time.Time `json:"updated_at"`
	TestPlan   `json:"test_plan"`
}

type VersionCommand

type VersionCommand struct {
	Version  string
	Revision string
}

func (*VersionCommand) Help

func (v *VersionCommand) Help() string

func (*VersionCommand) Run

func (v *VersionCommand) Run(args []string) int

func (*VersionCommand) Synopsis

func (r *VersionCommand) Synopsis() string

Jump to

Keyboard shortcuts

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