plan

package
v1.3.1-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package plan provides the model for the test plan.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Task

type Task struct {
	NodeNumber int        `json:"node_number"`
	Tests      []TestCase `json:"tests"`
}

Task represents the task for the given node.

type TestCase

type TestCase struct {
	EstimatedDuration int            `json:"estimated_duration,omitempty"`
	Format            TestCaseFormat `json:"format,omitempty"`
	Identifier        string         `json:"identifier,omitempty"`
	Name              string         `json:"name,omitempty"`
	Path              string         `json:"path"`
	Scope             string         `json:"scope,omitempty"`
}

TestCase represents a single test case.

type TestCaseFormat

type TestCaseFormat string
const (
	TestCaseFormatFile    TestCaseFormat = "file"
	TestCaseFormatExample TestCaseFormat = "example"
)

type TestPlan

type TestPlan struct {
	Experiment   string           `json:"experiment"`
	Tasks        map[string]*Task `json:"tasks"`
	Fallback     bool
	MutedTests   []TestCase `json:"muted_tests,omitempty"`
	SkippedTests []TestCase `json:"skipped_tests,omitempty"`
}

TestPlan represents the entire test plan.

func CreateFallbackPlan

func CreateFallbackPlan(files []string, parallelism int) TestPlan

CreateFallbackPlan creates a fallback test plan for the given tests and parallelism. It distributes test cases evenly accross the tasks using deterministic algorithm.

Jump to

Keyboard shortcuts

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