{"modulePath":"github.com/2lambda123/openshift-origin","version":"v4.1.0+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package stack\n\n## Functions\n\n```go\nfunc NewParser(builder builder.TestSuitesBuilder, testParser TestDataParser, suiteParser TestSuiteDataParser, stream bool) parser.TestOutputParser\n```\nNewParser returns a new parser that's capable of parsing Go unit test output\n\n## Types\n\n```go\ntype TestDataParser interface {\n\t// MarksBeginning determines if the line marks the beginning of a test case\n\tMarksBeginning(line string) bool\n\n\t// ExtractName extracts the name of the test case from test output lines\n\tExtractName(line string) (name string, succeeded bool)\n\n\t// ExtractResult extracts the test result from a test output line\n\tExtractResult(line string) (result api.TestResult, succeeded bool)\n\n\t// ExtractDuration extracts the test duration from a test output line\n\tExtractDuration(line string) (duration string, succeeded bool)\n\n\t// ExtractMessage extracts a message (e.g. for signalling why a failure or skip occurred) from a test output line\n\tExtractMessage(line string) (message string, succeeded bool)\n\n\t// MarksCompletion determines if the line marks the completion of a test case\n\tMarksCompletion(line string) bool\n}\n```\nTestDataParser knows how to take raw test data and extract the useful information from it\n\n```go\ntype TestSuiteDataParser interface {\n\t// MarksBeginning determines if the line marks the beginning of a test suite\n\tMarksBeginning(line string) bool\n\n\t// ExtractName extracts the name of the test suite from a test output line\n\tExtractName(line string) (name string, succeeded bool)\n\n\t// ExtractProperties extracts any metadata properties of the test suite from a test output line\n\tExtractProperties(line string) (properties map[string]string, succeeded bool)\n\n\t// MarksCompletion determines if the line marks the completion of a test suite\n\tMarksCompletion(line string) bool\n}\n```\nTestSuiteDataParser knows how to take raw test suite data and extract the useful information from it\n\n```go\ntype TestSuiteStack interface {\n\t// Push adds the testSuite to the top of the LIFO\n\tPush(pkg *api.TestSuite)\n\t// Pop removes the head of the LIFO and returns it\n\tPop() *api.TestSuite\n\t// Peek returns a reference to the head of the LIFO without removing it\n\tPeek() *api.TestSuite\n\t// IsEmpty determines if the stack has any members\n\tIsEmpty() bool\n}\n```\nTestSuiteStack is a data structure that holds api.TestSuite objects in a LIFO\n\n```go\nfunc NewTestSuiteStack() TestSuiteStack\n```\nNewTestSuiteStack returns a new TestSuiteStack\n\n","path":"github.com/2lambda123/openshift-origin/tools/junitreport/pkg/parser/stack","name":"stack","synopsis":"","isRedistributable":true}
