runexternaltasks

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

README

run_external_tasks Task

Description

The run_external_tasks task is designed to execute a set of tasks specified in an external test playbook. This functionality is key for integrating modular and reusable test configurations that are maintained outside the primary Assertoor configuration file.

Configuration Parameters

  • testFile:
    The path to the external test playbook file. This file contains the configuration for the tasks to be executed, including task definitions and any specific settings required for those tasks.

  • testConfig:
    A dictionary of static configuration parameters that are passed to the external test playbook. These configurations are used to customize or override settings within the external test playbook.

  • testConfigVars:
    A dictionary of dynamic variable expressions that are evaluated and also passed to the external test playbook.

  • expectFailure:
    A boolean that specifies whether the task is expected to fail. If set to true, the task will be considered successful if the external tasks fail.

  • ignoreFailure:
    A boolean that indicates whether failures in the external tasks should be ignored. If true, the run_external_tasks task will report success regardless of any failures that occur during the execution of the external tasks. This can be useful when the outcomes of the tasks are not critical to the overall test objectives.

Defaults

Default settings for the run_external_tasks task:

- name: run_external_tasks
  config:
    testFile: ""
    testConfig: {}
    testConfigVars: {}
    expectFailure: false
    ignoreFailure: false

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TaskName       = "run_external_tasks"
	TaskDescriptor = &types.TaskDescriptor{
		Name:        TaskName,
		Description: "Run external test playbook.",
		Config:      DefaultConfig(),
		NewTask:     NewTask,
	}
)

Functions

func NewTask

func NewTask(ctx *types.TaskContext, options *types.TaskOptions) (types.Task, error)

Types

type Config

type Config struct {
	TestFile       string            `yaml:"testFile" json:"testFile"`
	TestConfig     map[string]any    `yaml:"testConfig" json:"testConfig"`
	TestConfigVars map[string]string `yaml:"testConfigVars" json:"testConfigVars"`
	ExpectFailure  bool              `yaml:"expectFailure" json:"expectFailure"`
	IgnoreFailure  bool              `yaml:"ignoreFailure" json:"ignoreFailure"`
}

func DefaultConfig

func DefaultConfig() Config

func (*Config) Validate

func (c *Config) Validate() error

type Task

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

func (*Task) Config

func (t *Task) Config() interface{}

func (*Task) Execute

func (t *Task) Execute(ctx context.Context) error

func (*Task) LoadConfig

func (t *Task) LoadConfig() error

func (*Task) Timeout

func (t *Task) Timeout() time.Duration

Jump to

Keyboard shortcuts

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