Documentation ¶
Overview ¶
* Copyright contributors to the Galasa project * * SPDX-License-Identifier: EPL-2.0
* Copyright contributors to the Galasa project * * SPDX-License-Identifier: EPL-2.0
* Copyright contributors to the Galasa project * * SPDX-License-Identifier: EPL-2.0
* Copyright contributors to the Galasa project * * SPDX-License-Identifier: EPL-2.0
Index ¶
Constants ¶
const ( DATE_FORMAT = "2006-01-02 15:04:05" RUN_RESULT_TOTAL = "Total" RUN_RESULT_PASSED = "Passed" RUN_RESULT_PASSED_WITH_DEFECTS = "Passed With Defects" RUN_RESULT_FAILED = "Failed" RUN_RESULT_FAILED_WITH_DEFECTS = "Failed With Defects" RUN_RESULT_LOST = "Lost" RUN_RESULT_ENVFAIL = "EnvFail" RUN_RESULT_UNKNOWN = "UNKNOWN" RUN_RESULT_ACTIVE = "Active" RUN_RESULT_IGNORED = "Ignored" HEADER_RUNNAME = "name" HEADER_STATUS = "status" HEADER_RESULT = "result" HEADER_TEST_NAME = "test-name" HEADER_SUBMITTED_TIME = "submitted-time(UTC)" HEADER_START_TIME = "start-time(UTC)" HEADER_END_TIME = "end-time(UTC)" HEADER_DURATION = "duration(ms)" HEADER_BUNDLE = "bundle" HEADER_REQUESTOR = "requestor" HEADER_RUN_LOG = "run-log" HEADER_METHOD_NAME = "method" HEADER_METHOD_TYPE = "type" RAS_RUNS_URL = "/ras/runs/" )
----------------------------------------------------- RunsFormatter - implementations can take a collection of run results and turn them into a string for display to the user.
const (
DETAILS_FORMATTER_NAME = "details"
)
----------------------------------------------------- Detailed format.
const (
RAW_FORMATTER_NAME = "raw"
)
----------------------------------------------------- Summary format.
const (
SUMMARY_FORMATTER_NAME = "summary"
)
----------------------------------------------------- Summary format.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type DetailsFormatter ¶
type DetailsFormatter struct { }
func (*DetailsFormatter) FormatRuns ¶
func (*DetailsFormatter) FormatRuns(runs []FormattableTest) (string, error)
func (*DetailsFormatter) GetName ¶
func (*DetailsFormatter) GetName() string
----------------------------------------------------- Functions in the RunsFormatter interface
func (*DetailsFormatter) IsNeedingMethodDetails ¶
func (*DetailsFormatter) IsNeedingMethodDetails() bool
type FormattableTest ¶
type FormattableTest struct { RunId string Name string TestName string Status string Result string StartTimeUTC string EndTimeUTC string QueuedTimeUTC string Requestor string Bundle string ApiServerUrl string Methods []galasaapi.TestMethod Lost bool }
----------------------------------------------------- Structure to store test data from external structures to be used in by FomatRuns()
func NewFormattableTest ¶
func NewFormattableTest() FormattableTest
type RawFormatter ¶
type RawFormatter struct { }
func (*RawFormatter) FormatRuns ¶
func (*RawFormatter) FormatRuns(runs []FormattableTest) (string, error)
func (*RawFormatter) GetName ¶
func (*RawFormatter) GetName() string
func (*RawFormatter) IsNeedingMethodDetails ¶
func (*RawFormatter) IsNeedingMethodDetails() bool
type RunsFormatter ¶
type RunsFormatter interface { FormatRuns(testResultsData []FormattableTest) (string, error) GetName() string // IsNeedingDetails - Does this formatter require all of the detailed fields to be filled-in, // so they can be displayed ? True if so, false otherwise. // The caller may need to make sure such things are gathered before calling, and some // formatters may not need all the detail. IsNeedingMethodDetails() bool }
func NewDetailsFormatter ¶
func NewDetailsFormatter() RunsFormatter
----------------------------------------------------- Constructors
func NewRawFormatter ¶
func NewRawFormatter() RunsFormatter
func NewSummaryFormatter ¶
func NewSummaryFormatter() RunsFormatter
type SummaryFormatter ¶
type SummaryFormatter struct { }
func (*SummaryFormatter) FormatRuns ¶
func (*SummaryFormatter) FormatRuns(testResultsData []FormattableTest) (string, error)
func (*SummaryFormatter) GetName ¶
func (*SummaryFormatter) GetName() string
func (*SummaryFormatter) IsNeedingMethodDetails ¶
func (*SummaryFormatter) IsNeedingMethodDetails() bool