Documentation
¶
Index ¶
- func ParseBool(s string) bool
- func ParseInt(s string) int
- func ParseTime(s string) time.Duration
- func PropertyExists(properties Properties, propertyName string) bool
- func UUID(id uuid.UUID, str string) uuid.UUID
- type Error
- type Failure
- type Parser
- type Properties
- type Result
- type SemEnv
- type State
- type Status
- type Suite
- type Summary
- type Test
- type TestResult
- type TestResults
- type XMLElement
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PropertyExists ¶ added in v0.0.5
func PropertyExists(properties Properties, propertyName string) bool
PropertyExists checks if `propertyName` is in Properties
Types ¶
type Error ¶
type Error err
Error ...
func ParseError ¶ added in v0.0.5
func ParseError(xml XMLElement) *Error
ParseError parses <error> element from junit schema
type Failure ¶
type Failure err
Failure ...
func ParseFailure ¶ added in v0.0.5
func ParseFailure(xml XMLElement) *Failure
ParseFailure parses <failure> element from junit schema
type Parser ¶
type Parser interface { Parse(string) TestResults IsApplicable(string) bool GetName() string }
Parser ...
type Properties ¶
Properties maps additional parameters for test suites
func ParseProperties ¶ added in v0.0.5
func ParseProperties(xml XMLElement) Properties
ParseProperties maps <properties>
type Result ¶ added in v0.3.0
type Result struct {
TestResults []TestResults `json:"testResults"`
}
Result ...
type SemEnv ¶ added in v0.7.0
type SemEnv struct { ProjectId string `json:"projectId"` PipelineId string `json:"pipelineId"` WorkflowId string `json:"workflowId"` JobStartedAt string `json:"pipelineStartedAt"` JobName string `json:"jobName"` JobId string `json:"jobId"` AgentType string `json:"agentType"` AgentOsImage string `json:"agentOsImage"` GitRefType string `json:"gitRefType"` GitRefName string `json:"gitRefName"` GitRefSha string `json:"gitRefSha"` }
type State ¶
type State string
State indicates state of specific test
const ( // StatePassed indicates that test was successful StatePassed State = "passed" // StateError indicates that test errored due to unexpected behaviour when running test i.e. exception StateError State = "error" // StateFailed indicates that test failed due to invalid test result StateFailed State = "failed" // StateSkipped indicates that test was skipped StateSkipped State = "skipped" // StateDisabled indicates that test was disabled StateDisabled State = "disabled" )
type Suite ¶
type Suite struct { ID string `json:"id"` Name string `json:"name"` IsSkipped bool `json:"isSkipped"` IsDisabled bool `json:"isDisabled"` Timestamp string `json:"timestamp"` Hostname string `json:"hostname"` Package string `json:"package"` Properties Properties `json:"properties"` Summary Summary `json:"summary"` SystemOut string `json:"systemOut"` SystemErr string `json:"systemErr"` Tests []Test `json:"tests"` }
Suite ...
func EnsureSuiteByName ¶ added in v0.2.2
EnsureSuiteByName ...
type Summary ¶
type Summary struct { Total int `json:"total"` Passed int `json:"passed"` Skipped int `json:"skipped"` Error int `json:"error"` Failed int `json:"failed"` Disabled int `json:"disabled"` Duration time.Duration `json:"duration"` }
Summary ...
type Test ¶
type Test struct { ID string `json:"id"` File string `json:"file"` Classname string `json:"classname"` Package string `json:"package"` Name string `json:"name"` Duration time.Duration `json:"duration"` State State `json:"state"` Failure *Failure `json:"failure"` Error *Error `json:"error"` SystemOut string `json:"systemOut"` SystemErr string `json:"systemErr"` SemEnv SemEnv `json:"semaphoreEnv"` }
Test ...
type TestResult ¶ added in v0.7.0
type TestResult struct { TestId string GitSha string Duration time.Duration JobId string State State }
func (*TestResult) String ¶ added in v0.7.0
func (t *TestResult) String() []string
type TestResults ¶
type TestResults struct { ID string `json:"id"` Name string `json:"name"` Framework string `json:"framework"` IsDisabled bool `json:"isDisabled"` Summary Summary `json:"summary"` Status Status `json:"status"` StatusMessage string `json:"statusMessage"` Suites []Suite `json:"suites"` }
TestResults ...
func (*TestResults) Aggregate ¶
func (me *TestResults) Aggregate()
Aggregate all test suite summaries
func (*TestResults) ArrangeSuitesByTestFile ¶ added in v0.2.2
func (me *TestResults) ArrangeSuitesByTestFile()
ArrangeSuitesByTestFile ...
func (*TestResults) Combine ¶ added in v0.3.0
func (me *TestResults) Combine(other TestResults)
Combine ...
func (*TestResults) Flatten ¶ added in v0.3.1
func (me *TestResults) Flatten()
Flatten makes sure we don't have duplicated suites in test results
func (*TestResults) RegenerateID ¶ added in v0.4.3
func (me *TestResults) RegenerateID()
RegenerateID ...
type XMLElement ¶
type XMLElement struct { XMLName xml.Name Attributes map[string]string `xml:"-"` Children []XMLElement `xml:",any"` Contents []byte `xml:",chardata"` }
XMLElement ...
func (*XMLElement) UnmarshalXML ¶
func (me *XMLElement) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML ...
Click to show internal directories.
Click to hide internal directories.