ci_cd

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2019 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Package ci_cd provides an integration into the CI/CD to analyze test results.

The protocols of the test cases for a system-under-test version, which is given as parameter by the POST-Request, will be analyzed.

The response can either be "Passed" or "Failed" The tests in the stp are classified as follows: Not executed tests: Failed Executed tests can have different results:

  • Passed: Passed
  • Passed with comment: Passed
  • Failed: Failed
  • Not assessed: Failed

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IntegrationPost

func IntegrationPost(caseLister handler.TestCaseLister, caseAdder handler.TestCaseAdder, protocolLister handler.CaseProtocolLister,
	taskLister handler.TaskListGetter, taskAdder handler.TaskListAdder, projectAdder handler.ProjectAdder) http.HandlerFunc

IntegrationPost handles the requests from the ci/cd of an external project that has integrated the stp.

SOME BACKGROUND INFORMATION:

In the ci/cd pipeline, a stage for the manual tests is started. This starts a docker container containing the application https://gitlab.com/schneisn/stp-ci-integration. This app sends requests periodically to the stp to determine the state of the manual tests, which is done by this function.

AUTOMATIC TEST ASSIGNMENT:

Tests are automatically assigned to the testers for the given version.

If the version does not exist, the test-managers are given a task to assign this version to the correct test-cases. If this task is done, this function knows which tests can be assigned to the testers.

TOKEN:

The request has to contain the correct token to access the project. If it doesn't, the function returns a status forbidden.

MEANING OF THE RESPONSE CODES:

Status OK (200): All tests are executed successfully Status BAD REQUEST (400): All tests executed, at least on failed or not assessed Status NOT FOUND (404): Not all tests executed or no tests for the version+variant Status FORBIDDEN (403): Wrong token Status INTERNAL SERVER ERROR (500): Error computing the current state

Types

type CIRequestBody

type CIRequestBody struct {
	Version string
	Variant string
	Token   string
}

CIRequestBody represents the body of the request. It is used for json decoding.

Jump to

Keyboard shortcuts

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