parser

package
v0.0.0-...-ecf43de Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOutputFolder

func CreateOutputFolder(folder string)

CreateOutputFolder ...

func ExtractResults

func ExtractResults(events []*GoTestEvent, issuePattern string, testcasePattern string) map[string]*AllureResult

ExtractResults ...

func PrintResults

func PrintResults(outputFlag string, results map[string]*AllureResult)

PrintResults ...

Types

type AllureResult

type AllureResult struct {
	Name          string       `json:"name"`
	Status        string       `json:"status"`
	StatusDetails StatusDetail `json:"statusDetails"`
	Steps         []Step       `json:"steps"`
	Start         int64        `json:"start"`
	Stop          int64        `json:"stop"`
	UUID          uuid.UUID    `json:"uuid"`
	HistoryID     uuid.UUID    `json:"historyId"`
	FullName      string       `json:"fullName"`
	Labels        []Label      `json:"labels"`
	Description   string       `json:"description"`
	Links         []Link       `json:"links"`
}

AllureResult ...

type Attachment

type Attachment struct {
	Name   string `json:"name"`
	Source string `json:"source"`
	Type   string `json:"type"`
	Data   string `json:"-"`
}

Attachment ...

type GoTestEvent

type GoTestEvent struct {
	Time    time.Time `json:"Time"`
	Action  string    `json:"Action"`
	Package string    `json:"Package"`
	Test    string    `json:"Test"`
	Elapsed float64   `json:"Elapsed"`
	Output  string    `json:"Output"`
}

GoTestEvent - line in json-report.txt file

func ParseJsonsToGoTestEvents

func ParseJsonsToGoTestEvents(file io.Reader) []*GoTestEvent

ParseJsonsToGoTestEvents ...

func TrimGoTestEvents

func TrimGoTestEvents(events []*GoTestEvent) []*GoTestEvent

TrimGoTestEvents ...

type Label

type Label struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

Label ...

type Link struct {
	Name string `json:"name"`
	Type string `json:"type"`
	URL  string `json:"url"`
}

Link ...

type Parameter

type Parameter struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

Parameter ...

type StatusDetail

type StatusDetail struct {
	Message string `json:"message"`
	Trace   string `json:"trace"`
}

StatusDetail ...

type Step

type Step struct {
	Name        string       `json:"name"`
	Status      string       `json:"status"`
	Attachments []Attachment `json:"attachments"`
	Start       int64        `json:"start"`
	Stop        int64        `json:"stop"`
	Parameters  []Parameter  `json:"parameters"`
}

Step ...

Jump to

Keyboard shortcuts

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