projectmanagement

package
v0.0.0-...-47b7049 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const CacheFilename string = ".commentCache"

CacheFilename specifies the name of the CTM cachefile

Variables

This section is empty.

Functions

func Copy

func Copy(src, dst string) (int64, error)

Copy a file on OS level

func CreateHTMLReport

func CreateHTMLReport(filepath string, traces []Trace, cfg utils.Config, fullReport bool) *os.File

CreateHTMLReport creates a HTML report file (and returns the file reference) filepath - the dirpath where to create the file traces - list of all traces from the sourcecode cfg - An ctm config struct

func CreateJSONReport

func CreateJSONReport(filepath string, traces []Trace, cfg utils.Config) *os.File

CreateJSONReport creates a JSON report file (for potential further electronical processing of traceability result) filepath - the dirpath where to create the file traces - list of all traces from the sourcecode cfg - An ctm config struct

func CreateLinkInGHBackLogItem

func CreateLinkInGHBackLogItem(client *GitHubClient, traces []Trace)

CreateLinkInGHBackLogItem creates a link in a GitHub issue (Backlogitem) pointing to the corresponding entry for that backlog item in the traceability repository

func CreateLinkInJiraBackLogItem

func CreateLinkInJiraBackLogItem(cfg utils.Config, traces []Trace)

CreateLinkInJiraBackLogItem creates a link in a Jira issue (Backlogitem) pointing to the corresponding entry for that backlog item in the traceability repository

func CreateRequirementsMappingReport

func CreateRequirementsMappingReport(filepath string, traces []Trace, cfg utils.Config) *os.File
CreateRequirementsMappingReport Creates a requirement mapping file which can be used for processing in a differentinstance of CTM or other tools to process traceability information

filepath - the dirpath where to create the file traces - list of all traces from the sourcecode cfg - An ctm config struct

func GetGHBranch

func GetGHBranch(cfg utils.Config) string

GetGHBranch calculates the correct git branch for linking into the traceability repository

func GetNumberOfSuccessfulTestedTraces

func GetNumberOfSuccessfulTestedTraces(traces []Trace) int

GetNumberOfSuccessfulTestedTraces returns the number of successfully tested requirements

func GetTestResultURL

func GetTestResultURL(cfg utils.Config, item mapping.BacklogItem, branch string) string

GetTestResultURL return a link to the test result in the traceability repository branch can be used to overwrite the default branch from traceability repo config e.g. in case of a release tag, you want to overwrite the default branch (e.g. master with 1.5.0) so that link will point to a git tag

func UpdateTraceabilityRepository

func UpdateTraceabilityRepository(traces, deliveryTraces []Trace, client *GitHubClient)

UpdateTraceabilityRepository updates the traceability repository with the latest traceability reports (test result, ...)

Types

type GitHubClient

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

GitHubClient contains a GitHubClient to access GitHub as well as a CTM configuration

func CreateGitHubClient

func CreateGitHubClient(cfg utils.Config) *GitHubClient

CreateGitHubClient creates a GitHub client which uses an access token for authentication

type Mapping

type Mapping struct {
	SourceReference string   `json:"source_reference"`
	JiraKeys        []string `json:"jira_keys,omitempty"`
	GithubKeys      []string `json:"github_keys,omitempty"`
}

func CreateRequirementsMapping

func CreateRequirementsMapping(traces []Trace) []Mapping

type Trace

type Trace struct {
	TraceTests  []TraceTest
	BacklogItem mapping.BacklogItem
}

Trace maps a TraceTest (automated test and result) to a BacklogItem

type TraceTest

type TraceTest struct {
	SourceFile string
	ReportFile string
	ClassName  string
	MethodName string
	TestResult int
}

TraceTest maps an automated test (ClassName/MethodName) to it's result (TestResult), with the test result report (e.g. XUNIT) and the test sourcecode file

Jump to

Keyboard shortcuts

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