Documentation ¶
Index ¶
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 Project ¶
type Project struct { config.TypeDef `yaml:",inline" mapstructure:",squash"` DryRun bool `yaml:"-" json:"-"` ShowConsoleLog bool ConfigFilePath string `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"` Defaults config.Defaults `yaml:"defaults,omitempty" json:"defaults"` Env map[string]string `yaml:"env,omitempty" json:"env"` }
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"` 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"` // 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 bool `yaml:"quarantineMode,omitempty" json:"quarantineMode"` 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"` DisableVideo bool `yaml:"disableVideo,omitempty" json:"disableVideo"` // This field is for sauce, not for native testcafe config. Mode string `yaml:"mode,omitempty" json:"-"` // Deprecated. Reserved for future use for actual devices. Devices []config.Simulator `yaml:"devices,omitempty" json:"devices"` Simulators []config.Simulator `yaml:"emulators,omitempty" json:"emulators"` }
Suite represents the testcafe test suite configuration.