Documentation ¶
Index ¶
- Variables
- func FilterSuites(p *Project, suiteName string) error
- func IsSharded(suites []Suite) bool
- func SetDefaults(p *Project)
- func SplitSuites(p Project) (Project, Project)
- func Validate(p *Project) error
- type CompilerOptions
- type Filter
- type Project
- type Screenshots
- type Suite
- type Testcafe
- type TypescriptCompilerOptions
Constants ¶
This section is empty.
Variables ¶
var ( // Kind represents the type definition of this config. Kind = "testcafe" // APIVersion represents the supported config version. APIVersion = "v1alpha" )
Config descriptors.
Functions ¶
func FilterSuites ¶ added in v0.51.1
FilterSuites filters out suites in the project that don't match the given suite name.
func SetDefaults ¶ added in v0.51.1
func SetDefaults(p *Project)
SetDefaults applies config defaults in case the user has left them blank.
func SplitSuites ¶ added in v0.38.0
SplitSuites divided Suites to dockerSuites and sauceSuites
func Validate ¶ added in v0.50.0
Validate validates basic configuration of the project and returns an error if any of the settings contain illegal values. This is not an exhaustive operation and further validation should be performed both in the client and/or server side depending on the workflow that is executed.
Types ¶
type CompilerOptions ¶ added in v0.78.0
type CompilerOptions struct {
TypeScript TypescriptCompilerOptions `yaml:"typescript,omitempty" json:"typescript,omitempty"`
}
CompilerOptions represents the compiler options.
type Filter ¶ added in v0.70.0
type Filter struct { Test string `yaml:"test,omitempty" json:"test,omitempty"` TestGrep string `yaml:"testGrep,omitempty" json:"testGrep,omitempty"` Fixture string `yaml:"fixture,omitempty" json:"fixture,omitempty"` FixtureGrep string `yaml:"fixtureGrep,omitempty" json:"fixtureGrep,omitempty"` TestMeta map[string]string `yaml:"testMeta,omitempty" json:"testMeta,omitempty"` FixtureMeta map[string]string `yaml:"fixtureMeta,omitempty" json:"fixtureMeta,omitempty"` }
Filter represents the testcafe filters configuration
type Project ¶
type Project struct { config.TypeDef `yaml:",inline" mapstructure:",squash"` DryRun bool `yaml:"-" json:"-"` ShowConsoleLog bool `yaml:"showConsoleLog" json:"-"` ConfigFilePath string `yaml:"-" json:"-"` CLIFlags map[string]interface{} `yaml:"-" json:"-"` Sauce config.SauceConfig `yaml:"sauce,omitempty" json:"sauce"` // Suite is only used as a workaround to parse adhoc suites that are created via CLI args. Suite Suite `yaml:"suite,omitempty" json:"-"` Suites []Suite `yaml:"suites,omitempty" json:"suites"` BeforeExec []string `yaml:"beforeExec,omitempty" json:"beforeExec"` Docker config.Docker `yaml:"docker,omitempty" json:"docker"` Testcafe Testcafe `yaml:"testcafe,omitempty" json:"testcafe"` Npm config.Npm `yaml:"npm,omitempty" json:"npm"` RootDir string `yaml:"rootDir,omitempty" json:"rootDir"` RunnerVersion string `yaml:"runnerVersion,omitempty" json:"runnerVersion"` Artifacts config.Artifacts `yaml:"artifacts,omitempty" json:"artifacts"` Reporters config.Reporters `yaml:"reporters,omitempty" json:"-"` Defaults config.Defaults `yaml:"defaults,omitempty" json:"defaults"` Env map[string]string `yaml:"env,omitempty" json:"env"` Notifications config.Notifications `yaml:"notifications,omitempty" json:"-"` }
Project represents the testcafe project configuration.
type Screenshots ¶
type Screenshots struct { TakeOnFails bool `yaml:"takeOnFails,omitempty" json:"takeOnFails"` FullPage bool `yaml:"fullPage,omitempty" json:"fullPage"` }
Screenshots represents screenshots configuration.
type Suite ¶
type Suite struct { Name string `yaml:"name,omitempty" json:"name"` BrowserName string `yaml:"browserName,omitempty" json:"browserName"` BrowserVersion string `yaml:"browserVersion,omitempty" json:"browserVersion"` BrowserArgs []string `yaml:"browserArgs,omitempty" json:"browserArgs"` Src []string `yaml:"src,omitempty" json:"src"` Screenshots Screenshots `yaml:"screenshots,omitempty" json:"screenshots"` PlatformName string `yaml:"platformName,omitempty" json:"platformName"` ScreenResolution string `yaml:"screenResolution,omitempty" json:"screenResolution"` Env map[string]string `yaml:"env,omitempty" json:"env"` Timeout time.Duration `yaml:"timeout,omitempty" json:"timeout"` // Deprecated as of TestCafe v1.10.0 https://testcafe.io/documentation/402638/reference/configuration-file#tsconfigpath TsConfigPath string `yaml:"tsConfigPath,omitempty" json:"tsConfigPath"` ClientScripts []string `yaml:"clientScripts,omitempty" json:"clientScripts,omitempty"` SkipJsErrors bool `yaml:"skipJsErrors,omitempty" json:"skipJsErrors"` QuarantineMode map[string]interface{} `yaml:"quarantineMode,omitempty" json:"quarantineMode,omitempty"` SkipUncaughtErrors bool `yaml:"skipUncaughtErrors,omitempty" json:"skipUncaughtErrors"` SelectorTimeout int `yaml:"selectorTimeout,omitempty" json:"selectorTimeout"` AssertionTimeout int `yaml:"assertionTimeout,omitempty" json:"assertionTimeout"` PageLoadTimeout int `yaml:"pageLoadTimeout,omitempty" json:"pageLoadTimeout"` Speed float64 `yaml:"speed,omitempty" json:"speed"` StopOnFirstFail bool `yaml:"stopOnFirstFail,omitempty" json:"stopOnFirstFail"` DisablePageCaching bool `yaml:"disablePageCaching,omitempty" json:"disablePageCaching"` DisableScreenshots bool `yaml:"disableScreenshots,omitempty" json:"disableScreenshots"` Filter Filter `yaml:"filter,omitempty" json:"filter,omitempty"` DisableVideo bool `yaml:"disableVideo,omitempty" json:"disableVideo"` // This field is for sauce, not for native testcafe config. Mode string `yaml:"mode,omitempty" json:"-"` Shard string `yaml:"shard,omitempty" json:"-"` Headless bool `yaml:"headless,omitempty" json:"headless"` // TypeScript compiling options CompilerOptions CompilerOptions `yaml:"compilerOptions,omitempty" json:"compilerOptions"` // Deprecated. Reserved for future use for actual devices. Devices []config.Simulator `yaml:"devices,omitempty" json:"devices"` Simulators []config.Simulator `yaml:"simulators,omitempty" json:"simulators"` }
Suite represents the testcafe test suite configuration.
type Testcafe ¶
type Testcafe struct { // Version represents the testcafe framework version. Version string `yaml:"version,omitempty" json:"version"` }
Testcafe represents the configuration for testcafe.
type TypescriptCompilerOptions ¶ added in v0.78.0
type TypescriptCompilerOptions struct { ConfigPath string `yaml:"configPath,omitempty" json:"configPath,omitempty"` CustomCompilerModulePath string `yaml:"customCompilerModulePath,omitempty" json:"customCompilerModulePath,omitempty"` Options map[string]string `yaml:"options,omitempty" json:"options,omitempty"` }
TypescriptCompilerOptions represents the typescript compiler options.