testkube

package
v0.6.4-beta003 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: MIT Imports: 2 Imported by: 32

Documentation

Overview

* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* testkube * * Efficient testing of k8s applications mandates a k8s native approach to test mgmt/definition/execution - testkube provides a “quality control plane” that natively integrates testing activities into k8s development and operational workflows * * API version: 0.0.5 * Contact: api@testkube.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* testkube * * Efficient testing of k8s applications mandates a k8s native approach to test mgmt/definition/execution - testkube provides a “quality control plane” that natively integrates testing activities into k8s development and operational workflows * * API version: 0.0.5 * Contact: api@testkube.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* testkube * * Efficient testing of k8s applications mandates a k8s native approach to test mgmt/definition/execution - testkube provides a “quality control plane” that natively integrates testing activities into k8s development and operational workflows * * API version: 0.0.1 * Contact: api@testkube.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* TestKube API * * TestKube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssertionResult

type AssertionResult struct {
	Name         string `json:"name,omitempty"`
	Status       string `json:"status,omitempty"`
	ErrorMessage string `json:"errorMessage,omitempty"`
}

execution result data

type Execution

type Execution struct {
	// execution id
	Id string `json:"id,omitempty"`
	// unique script name (CRD Script name)
	ScriptName string `json:"scriptName,omitempty"`
	// script type e.g. postman/collection
	ScriptType string `json:"scriptType,omitempty"`
	// execution name
	Name string `json:"name,omitempty"`
	// execution envs passed to executor
	Envs map[string]string `json:"envs,omitempty"`
	// script metadata content
	ScriptContent string      `json:"scriptContent,omitempty"`
	Repository    *Repository `json:"repository,omitempty"`
	// execution params passed to executor
	Params          map[string]string `json:"params,omitempty"`
	ExecutionResult *ExecutionResult  `json:"executionResult,omitempty"`
}

API server script execution

func ExecutorStartRequestToExecution

func ExecutorStartRequestToExecution(request ExecutorStartRequest) Execution

scripts execution request body

func NewExecution

func NewExecution(scriptName, name, scriptType, scriptContent string, result ExecutionResult, params map[string]string) Execution

func NewExecutionWithID

func NewExecutionWithID(id, scriptType, scriptName string) Execution

func (Execution) Err

func (e Execution) Err(err error) Execution

func (*Execution) WithContent

func (e *Execution) WithContent(content string) *Execution

func (*Execution) WithParams

func (e *Execution) WithParams(params map[string]string) *Execution

func (*Execution) WithRepository

func (e *Execution) WithRepository(repository *Repository) *Execution

func (*Execution) WithRepositoryData

func (e *Execution) WithRepositoryData(uri, branch, path string) *Execution

type ExecutionRequest

type ExecutionRequest struct {
	// script execution custom name
	Name string `json:"name,omitempty"`
	// script kubernetes namespace (\"testkube\" when not set)
	Namespace string `json:"namespace,omitempty"`
	// execution params passed to executor
	Params map[string]string `json:"params,omitempty"`
}

scripts execution request body

type ExecutionResult

type ExecutionResult struct {
	Status *ExecutionStatus `json:"status"`
	// test start time
	StartTime time.Time `json:"startTime,omitempty"`
	// test end time
	EndTime time.Time `json:"endTime,omitempty"`
	// RAW Script execution output, depends of reporter used in particular tool
	Output string `json:"output,omitempty"`
	// output type depends of reporter used in partucular tool
	OutputType string `json:"outputType,omitempty"`
	// error message when status is error, separate to output as output can be partial in case of error
	ErrorMessage string `json:"errorMessage,omitempty"`
	// execution steps (for collection of requests)
	Steps []ExecutionStepResult `json:"steps,omitempty"`
}

execution result returned from executor

func NewQueuedResult

func NewQueuedResult() ExecutionResult

func NewResult

func NewResult() ExecutionResult

func (*ExecutionResult) Duration

func (e *ExecutionResult) Duration() time.Duration

func (*ExecutionResult) Err

func (*ExecutionResult) Error

func (e *ExecutionResult) Error()

func (*ExecutionResult) IsCompleted

func (e *ExecutionResult) IsCompleted() bool

func (*ExecutionResult) IsFailed

func (e *ExecutionResult) IsFailed() bool

func (*ExecutionResult) IsPending

func (e *ExecutionResult) IsPending() bool

func (*ExecutionResult) IsQueued

func (e *ExecutionResult) IsQueued() bool

func (*ExecutionResult) IsSuccesful

func (e *ExecutionResult) IsSuccesful() bool

func (*ExecutionResult) Start

func (e *ExecutionResult) Start()

func (*ExecutionResult) Stop

func (e *ExecutionResult) Stop()

func (*ExecutionResult) Success

func (e *ExecutionResult) Success()

type ExecutionResultStep

type ExecutionResultStep struct {
	// step name
	Name string `json:"name,omitempty"`
	// script execution start time
	StartTime time.Time `json:"startTime,omitempty"`
	// script execution start time
	EndTime time.Time `json:"endTime,omitempty"`
	// execution step status
	Status     string                        `json:"status,omitempty"`
	Assertions *ExecutionResultStepAssertion `json:"assertions,omitempty"`
}

execution result data

type ExecutionResultStepAssertion

type ExecutionResultStepAssertion struct {
	Name         string `json:"name,omitempty"`
	Status       string `json:"status,omitempty"`
	ErrorMessage string `json:"errorMessage,omitempty"`
}

execution result data

type ExecutionStatus

type ExecutionStatus string
const (
	QUEUED_ExecutionStatus  ExecutionStatus = "queued"
	PENDING_ExecutionStatus ExecutionStatus = "pending"
	SUCCESS_ExecutionStatus ExecutionStatus = "success"
	ERROR__ExecutionStatus  ExecutionStatus = "error"
)

List of ExecutionStatus

func StatusPtr

func StatusPtr(status ExecutionStatus) *ExecutionStatus

type ExecutionStepResult

type ExecutionStepResult struct {
	// step name
	Name     string `json:"name"`
	Duration string `json:"duration,omitempty"`
	// execution step status
	Status           string            `json:"status"`
	AssertionResults []AssertionResult `json:"assertionResults,omitempty"`
}

execution result data

type ExecutionSummary

type ExecutionSummary struct {
	// execution id
	Id string `json:"id"`
	// execution name
	Name string `json:"name"`
	// name of the script
	ScriptName string `json:"scriptName"`
	// the type of script for this execution
	ScriptType string           `json:"scriptType"`
	Status     *ExecutionStatus `json:"status"`
	// test execution start time
	StartTime time.Time `json:"startTime,omitempty"`
	// test execution end time
	EndTime time.Time `json:"endTime,omitempty"`
}

execution summary

type Executions

type Executions []Execution

func (Executions) Table

func (executions Executions) Table() (header []string, output [][]string)

type ExecutionsResult

type ExecutionsResult struct {
	Totals   *ExecutionsTotals  `json:"totals"`
	Filtered *ExecutionsTotals  `json:"filtered,omitempty"`
	Results  []ExecutionSummary `json:"results"`
}

the result for a page of executions

func (ExecutionsResult) Table

func (result ExecutionsResult) Table() (header []string, output [][]string)

type ExecutionsTotals

type ExecutionsTotals struct {
	// the total number of executions available
	Results int32 `json:"results"`
	// the total number of passed executions available
	Passed int32 `json:"passed"`
	// the total number of failed executions available
	Failed int32 `json:"failed"`
	// the total number of queued executions available
	Queued int32 `json:"queued"`
	// the total number of running executions available
	Pending int32 `json:"pending"`
}

various execution counters

type Executor added in v0.6.4

type Executor struct {
	// ExecutorType one of \"rest\" for rest openapi based executors or \"job\" which will be default runners for testkube soon
	ExecutorType string `json:"executorType,omitempty"`
	// Image for kube-job
	Image string `json:"image,omitempty"`
	// Types defines what types can be handled by executor e.g. \"postman/collection\", \":curl/command\" etc
	Types []string `json:"types,omitempty"`
	// URI for rest based executors
	Uri string `json:"uri,omitempty"`
	// VolumeMountPath - where should PV be monted inside job pod for e.g. artifacts
	VolumeMountPath string `json:"volumeMountPath,omitempty"`
	// VolumeQuantity for kube-job PersistentVolume
	VolumeQuantity string `json:"volumeQuantity,omitempty"`
}

CRD based executor data

type ExecutorCreateRequest added in v0.6.4

type ExecutorCreateRequest struct {
	// ExecutorType one of \"rest\" for rest openapi based executors or \"job\" which will be default runners for testkube soon
	ExecutorType string `json:"executorType,omitempty"`
	// Image for kube-job
	Image string `json:"image,omitempty"`
	// Types defines what types can be handled by executor e.g. \"postman/collection\", \":curl/command\" etc
	Types []string `json:"types"`
	// URI for rest based executors
	Uri string `json:"uri,omitempty"`
	// VolumeMountPath - where should PV be monted inside job pod for e.g. artifacts
	VolumeMountPath string `json:"volumeMountPath,omitempty"`
	// VolumeQuantity for kube-job PersistentVolume
	VolumeQuantity string `json:"volumeQuantity,omitempty"`
	// executor name
	Name string `json:"name"`
	// Kubernetes namespace
	Namespace string `json:"namespace"`
}

executor create request body

type ExecutorDetails added in v0.6.4

type ExecutorDetails struct {
	// Executor name
	Name       string            `json:"name,omitempty"`
	Executor   *Executor         `json:"executor,omitempty"`
	Executions *ExecutionsResult `json:"executions,omitempty"`
}

Executor details with Executor data and additional information like list of executions

type ExecutorStartRequest

type ExecutorStartRequest struct {
	// ID of script execution to handle by executor, execution need to be able to return execution info based on this ID
	Id string `json:"id,omitempty"`
	// script type
	Type_ string `json:"type,omitempty"`
	// script execution custom name
	Name string `json:"name,omitempty"`
	// execution params passed to executor
	Params map[string]string `json:"params,omitempty"`
	// script content as string (content depends from executor)
	Content string `json:"content,omitempty"`
	// script content type can be:  - direct content - created from file, - git repository with path, will be checked out, useful when test have more than one file or complicated directory structure,
	InputType  string      `json:"inputType,omitempty"`
	Repository *Repository `json:"repository,omitempty"`
}

scripts execution request body when calling new execution request

type ExecutorsDetails added in v0.6.4

type ExecutorsDetails []ExecutorDetails

func (ExecutorsDetails) Table added in v0.6.4

func (list ExecutorsDetails) Table() (header []string, output [][]string)

type KeyValue

type KeyValue struct {
	Name  string `json:"name,omitempty"`
	Value string `json:"value,omitempty"`
}

environment variable

type Problem

type Problem struct {
	// Type contains a URI that identifies the problem type. This URI will,
	Type_ string `json:"type,omitempty"`
	// Title is a short, human-readable summary of the problem type. This title SHOULD NOT change from occurrence to occurrence of the problem, except forpurposes of localization.
	Title string `json:"title,omitempty"`
	// HTTP status code for this occurrence of the problem.
	Status int32 `json:"status,omitempty"`
	// A human-readable explanation specific to this occurrence of the problem.
	Detail string `json:"detail,omitempty"`
	// A URI that identifies the specific occurrence of the problem. This URI may or may not yield further information if de-referenced.
	Instance string `json:"instance,omitempty"`
}

problem response in case of error

type Repository

type Repository struct {
	// VCS repository type
	Type_ string `json:"type"`
	// uri of content file or git directory
	Uri string `json:"uri"`
	// branch/tag name for checkout
	Branch string `json:"branch"`
	// if needed we can checkout particular path (dir or file) in case of BIG/mono repositories
	Path string `json:"path,omitempty"`
}

repository representation for tests in git repositories

type Script

type Script struct {
	// script name
	Name string `json:"name,omitempty"`
	// script type
	Type_ string `json:"type,omitempty"`
	// script content
	Content string    `json:"content,omitempty"`
	Created time.Time `json:"created,omitempty"`
}

type ScriptCreateRequest

type ScriptCreateRequest struct {
	// script name - Custom Resource name - must be unique, use only lowercase numbers and dashes (-)
	Name string `json:"name,omitempty"`
	// script type - what executor type should be used during test execution
	Type_ string `json:"type,omitempty"`
	// kubernetes namespace (defaults to 'testkube')
	Namespace string `json:"namespace,omitempty"`
	// script content type can be:  - direct content - created from file,  - git repo directory checkout in case when test is some kind of project or have more than one file,
	InputType  string      `json:"inputType,omitempty"`
	Repository *Repository `json:"repository,omitempty"`
	// script content - executor specific e.g. fo postman-collections executor
	Content string `json:"content,omitempty"`
}

scripts create request body

type Scripts

type Scripts []Script

func (Scripts) Table

func (scripts Scripts) Table() (header []string, output [][]string)

type ServerInfo added in v0.6.2

type ServerInfo struct {
	// build version
	Version string `json:"version"`
	// build commit
	Commit string `json:"commit,omitempty"`
}

Server information with build version, build commit etc.

Jump to

Keyboard shortcuts

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