Documentation
¶
Index ¶
- Constants
- func ConvertStatus(status string) string
- func CopyAttachment(ctx context.Context, old *AttachmentResult, value *Attachment) error
- func GetLabelByName(labels []*Label, name string) string
- func HasTestStage(result *TestResult) bool
- func MergeTreeLeaf(sum *TreeLeaf, added *TreeLeaf)
- type Attachment
- type AttachmentResult
- type ContextKey
- type FixtureResult
- type Fixtures
- type Label
- type Link
- type Parameter
- type ParameterResult
- type PluginResult
- type StageResult
- type Statistic
- type StatusDetails
- type Step
- type StepResult
- type Summarizable
- type Test
- type TestResult
- type TestResultContainer
- type Time
- type TreeLeaf
- type TrendItem
- type WidgetData
- type WidgetItem
Constants ¶
View Source
const ( ResultFormat = "resultFormat" Allure2ResultsFormat = "allure2" )
View Source
const ( CtxInputDirPathKey ContextKey = "inputDirPath" CtxOutputDirPathKey ContextKey = "outputDirPath" CtxContainerResultsKey ContextKey = "containerResults" CtxCurrentProcessorNameKey ContextKey = "currentProcessorName" CtxWriteData ContextKey = "writeData" CtxUseBars ContextKey = "useBars" SerialVersionUID int64 = 1 StatusFailed = "failed" StatusBroken = "broken" StatusPassed = "passed" StatusSkipped = "skipped" StatusUnknown = "unknown" TestClassLabelName = "testClass" TestMethodLabelName = "testMethod" )
Variables ¶
This section is empty.
Functions ¶
func ConvertStatus ¶
func CopyAttachment ¶
func CopyAttachment(ctx context.Context, old *AttachmentResult, value *Attachment) error
func GetLabelByName ¶
func HasTestStage ¶
func HasTestStage(result *TestResult) bool
func MergeTreeLeaf ¶
Types ¶
type Attachment ¶
type Attachment struct {
Uid string `json:"uid"`
Size int64 `json:"size"`
Name string `json:"name"`
OldSource string `json:"-"`
Source string `json:"source"`
Type string `json:"type"`
}
func ConvertAttachment ¶
func ConvertAttachment(attachment *AttachmentResult, args ...any) *Attachment
func ReadAttachment ¶
func ReadAttachment(ctx context.Context, item *AttachmentResult) (*Attachment, error)
func (*Attachment) String ¶
func (a *Attachment) String() string
type AttachmentResult ¶
type ContextKey ¶
type ContextKey string
type FixtureResult ¶
type Fixtures ¶
type Fixtures struct {
Befores []*StageResult `json:"befores"`
Afters []*StageResult `json:"afters"`
}
type Label ¶
func AddLabelIfNotExists ¶
type Parameter ¶
func ConvertParameter ¶
func ConvertParameter(parameter *ParameterResult, _ ...any) *Parameter
type ParameterResult ¶
type PluginResult ¶
type PluginResult struct {
Data []any
}
type StageResult ¶
type StageResult struct {
Summarizable
Time *Time `json:"time,omitempty"`
Description string `json:"description"`
DescriptionHtml string `json:"descriptionHtml,omitempty"`
Status string `json:"status"`
StatusTrace string `json:"statusTrace,omitempty"`
}
func ConvertStageResult ¶
func ConvertStageResult(f *StepResult, args ...any) *StageResult
func GetTestStage ¶
func GetTestStage(t *TestResult, args ...any) *StageResult
func (*StageResult) MarshalJSON ¶
func (s *StageResult) MarshalJSON() ([]byte, error)
type Statistic ¶
type Statistic struct {
Failed int64 `json:"failed"`
Broken int64 `json:"broken"`
Skipped int64 `json:"skipped"`
Passed int64 `json:"passed"`
Unknown int64 `json:"unknown"`
}
func (*Statistic) MarshalJSON ¶
func (*Statistic) MergeStatistic ¶
func (*Statistic) UpdateStatistic ¶
type StatusDetails ¶
type Step ¶
type Step struct {
Summarizable
Time *Time `json:"time,omitempty"`
Status string `json:"status"`
StatusTrace string `json:"statusTrace,omitempty"`
}
func ConvertStep ¶
func ConvertStep(s *StepResult, args ...any) *Step
func (*Step) MarshalJSON ¶
type StepResult ¶
type StepResult struct {
Name string `json:"name"`
Status string `json:"status"`
StatusDetails StatusDetails `json:"statusDetails"`
Stage string `json:"stage"`
Description string `json:"description"`
DescriptionHtml string `json:"descriptionHtml"`
Steps []StepResult `json:"steps"`
Attachments []AttachmentResult `json:"attachments"`
Parameters []ParameterResult `json:"parameters"`
Start int64 `json:"start"`
Stop int64 `json:"stop"`
}
type Summarizable ¶
type Summarizable struct {
Name string `json:"name,omitempty"`
StatusMessage string `json:"statusMessage,omitempty"`
Steps []*Step `json:"steps"`
Attachments []*Attachment `json:"attachments"`
Parameters []*Parameter `json:"parameters"`
}
func (*Summarizable) GetAttachmentCount ¶
func (s *Summarizable) GetAttachmentCount() int
func (*Summarizable) GetStepsCount ¶
func (s *Summarizable) GetStepsCount() int
func (*Summarizable) HasContent ¶
func (s *Summarizable) HasContent() bool
func (*Summarizable) IsAttachmentStep ¶
func (s *Summarizable) IsAttachmentStep() bool
func (*Summarizable) ShouldDisplayMessage ¶
func (s *Summarizable) ShouldDisplayMessage() bool
type Test ¶
type Test struct {
Uid string `json:"uid"`
Name string `json:"name"`
FullName string `json:"fullName"`
HistoryId string `json:"historyId"`
TestId string `json:"testId,omitempty"`
Time *Time `json:"time,omitempty"`
Description string `json:"description"`
DescriptionHtml string `json:"descriptionHtml,omitempty"`
Status string `json:"status"`
StatusMessage string `json:"statusMessage,omitempty"`
StatusTrace string `json:"statusTrace,omitempty"`
Flaky bool `json:"flaky"`
NewFailed bool `json:"newFailed"`
NewBroken bool `json:"newBroken"`
NewPassed bool `json:"newPassed"`
RetriesCount int `json:"retriesCount"`
RetriesStatusChange bool `json:"retriesStatusChange"`
// Execution
BeforeStages []*StageResult `json:"beforeStages"`
TestStage *StageResult `json:"testStage"`
AfterStages []*StageResult `json:"afterStages"`
// Meta
Labels []*Label `json:"labels"`
Parameters []*Parameter `json:"parameters"`
Links []*Link `json:"links"`
Hidden bool `json:"hidden"`
Retry bool `json:"retry"`
Extra map[string]any `json:"extra"`
}
func ConvertTest ¶
func ConvertTest(t *TestResult, args ...any) *Test
type TestResult ¶
type TestResult struct {
Uuid string `json:"uuid"`
HistoryId string `json:"historyId"`
TestCaseId string `json:"testCaseId"`
TestCaseName string `json:"testCaseName"`
FullName string `json:"fullName"`
Labels []Label `json:"labels"`
Links []Link `json:"links"`
Name string `json:"name"`
Status string `json:"status"` //enum
StatusDetails StatusDetails `json:"statusDetails"`
Stage string `json:"stage"` //enum
Description string `json:"description"`
DescriptionHtml string `json:"descriptionHtml"`
Steps []StepResult `json:"steps"`
Attachments []AttachmentResult `json:"attachments"`
Parameters []ParameterResult `json:"parameters"`
Start int64 `json:"start"`
Stop int64 `json:"stop"`
}
type TestResultContainer ¶
type TestResultContainer struct {
Uuid string `json:"uuid"`
Name string `json:"name"`
Children []string `json:"children"`
Description string `json:"description"`
DescriptionHtml string `json:"descriptionHtml"`
Befores []StepResult `json:"befores"`
Afters []StepResult `json:"afters"`
Links []Link `json:"links"`
Start int64 `json:"start"`
Stop int64 `json:"stop"`
}
type Time ¶
type Time struct {
Start int64 `json:"start"`
Stop int64 `json:"stop"`
Duration int64 `json:"duration"`
}
func ConvertTime ¶
type TreeLeaf ¶
type TreeLeaf struct {
Uid string `json:"uid"`
Name string `json:"name"`
Children []*TreeLeaf `json:"children,omitempty"`
ParentUid string `json:"parentUid,omitempty"`
Status string `json:"status,omitempty"`
Time *Time `json:"time,omitempty"`
Flaky bool `json:"flaky,omitempty"`
NewFailed bool `json:"newFailed,omitempty"`
NewPassed bool `json:"newPassed,omitempty"`
NewBroken bool `json:"newBroken,omitempty"`
RetriesCount int `json:"retriesCount,omitempty"`
RetriesStatusChange bool `json:"retriesStatusChange,omitempty"`
Parameters []string `json:"parameters,omitempty"`
Tags []string `json:"tags,omitempty"`
}
func NewTreeLeaf ¶
func TreeLeafFromTest ¶
func (*TreeLeaf) GetLeafByLabelName ¶
func (*TreeLeaf) GetStatistic ¶
func (*TreeLeaf) GetWidgetData ¶
func (t *TreeLeaf) GetWidgetData() *WidgetData
type WidgetData ¶
type WidgetData struct {
Total int64 `json:"total"`
Items []*WidgetItem `json:"items,omitempty"`
}
func (*WidgetData) ToTrendItem ¶
func (w *WidgetData) ToTrendItem() *TrendItem
type WidgetItem ¶
Click to show internal directories.
Click to hide internal directories.