config

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageDefinition

type ImageDefinition struct {
	Base    string                 `yaml:"base"`
	Version string                 `yaml:"version"`
	Exec    string                 `yaml:"exec"`
	Options map[string]interface{} `yaml:"options"`
}

ImageDefinition describe configuration to the testrunner image

type Metadata

type Metadata struct {
	Name  string   `yaml:"name"`
	Tags  []string `yaml:"tags"`
	Build string   `yaml:"build"`
}

Metadata describes job metadata

func (*Metadata) ExpandEnv added in v0.9.1

func (m *Metadata) ExpandEnv()

ExpandEnv expands environment variables inside metadata fields.

Example
os.Setenv("tname", "Envy")
os.Setenv("ttag", "xp1")
os.Setenv("tbuild", "Bob")

m := Metadata{
	Name:  "Test $tname",
	Tags:  []string{"$ttag"},
	Build: "Build $tbuild",
}

m.ExpandEnv()

fmt.Println(m)
Output:

{Test Envy [xp1] Build Bob}

type Project added in v0.11.0

type Project struct {
	APIVersion string            `yaml:"apiVersion"`
	Kind       string            `yaml:"kind"`
	Metadata   Metadata          `yaml:"metadata"`
	Suites     []Suite           `yaml:"suites"`
	Files      []string          `yaml:"files"`
	Image      ImageDefinition   `yaml:"image"`
	BeforeExec []string          `yaml:"beforeExec"`
	Timeout    int               `yaml:"timeout"`
	Sauce      SauceConfig       `yaml:"sauce"`
	Env        map[string]string `yaml:"env"`
	Parallel   bool              `yaml:"parallel"`
}

Project represents the project configuration.

func NewJobConfiguration

func NewJobConfiguration(cfgFilePath string) (Project, error)

NewJobConfiguration creates a new job configuration based on a config file

func (*Project) SyncCapabilities added in v0.14.0

func (p *Project) SyncCapabilities()

SyncCapabilities uses the project capabilities if no settings have been defined in the suites.

type Run added in v0.12.0

type Run struct {
	Match       []string `yaml:"match"`
	ProjectPath string   `yaml:"projectPath"`
}

Run represents the configuration for a particular test run. This information is communicated to the test framework.

type RunnerConfiguration

type RunnerConfiguration struct {
	RootDir     string   `yaml:"rootDir"`
	TargetDir   string   `yaml:"targetDir"`
	ExecCommand []string `yaml:"execCommand"`
}

RunnerConfiguration describes configurations for the testrunner

func NewRunnerConfiguration

func NewRunnerConfiguration(cfgFilePath string) (RunnerConfiguration, error)

NewRunnerConfiguration reads yaml file for runner configurations

type SauceConfig added in v0.8.0

type SauceConfig struct {
	Region string `yaml:"region"`
}

SauceConfig represents sauce labs related settings.

type Settings added in v0.14.0

type Settings struct {
	BrowserName               string   `yaml:"browserName"`
	BrowserVersion            string   `yaml:"browserVersion"`
	PlatformName              string   `yaml:"platformName"`
	AcceptInsecureCerts       bool     `yaml:"acceptInsecureCerts"`
	PageLoadStrategy          bool     `yaml:"pageLoadStrategy"`
	SetWindowRect             bool     `yaml:"setWindowRect"`
	Timeouts                  Timeouts `yaml:"timeouts"`
	StrictFileInteractability bool     `yaml:"strictFileInteractability"`
	UnhandledPromptBehavior   string   `yaml:"unhandledPromptBehavior"`
}

Settings describes job settings

type Suite added in v0.11.0

type Suite struct {
	Name         string   `yaml:"name"`
	Capabilities Settings `yaml:"capabilities"`
	Settings     Settings `yaml:"settings"`
	Match        string   `yaml:"match"`
}

Suite represents the test suite configuration.

type Timeouts

type Timeouts struct {
	Script   int `yaml:"script"`
	PageLoad int `yaml:"pageLoad"`
	Implicit int `yaml:"implicit"`
}

Timeouts describes WebDriver timeouts

Jump to

Keyboard shortcuts

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