How to use CLS method of reporters_test Package

Best Ginkgo code snippet using reporters_test.CLS

default_reporter_test.go

Source:default_reporter_test.go Github

copy

Full Screen

...19var cl1 = types.CodeLocation{FileName: "cl1.go", LineNumber: 37, FullStackTrace: "full-trace\ncl-1"}20var cl2 = types.CodeLocation{FileName: "cl2.go", LineNumber: 80, FullStackTrace: "full-trace\ncl-2"}21var cl3 = types.CodeLocation{FileName: "cl3.go", LineNumber: 103, FullStackTrace: "full-trace\ncl-3"}22var cl4 = types.CodeLocation{FileName: "cl4.go", LineNumber: 144, FullStackTrace: "full-trace\ncl-4"}23func CLS(cls ...types.CodeLocation) []types.CodeLocation { return cls }24func CTS(componentTexts ...string) []string              { return componentTexts }25func CLabels(labels ...Labels) []Labels                  { return labels }26type FailureNodeLocation types.CodeLocation27type ForwardedPanic string28var PLACEHOLDER_TIME = time.Now()29var FORMATTED_TIME = PLACEHOLDER_TIME.Format(types.GINKGO_TIME_FORMAT)30// convenience helper to quickly make Failures31func F(options ...interface{}) types.Failure {32	failure := types.Failure{}33	for _, option := range options {34		switch reflect.TypeOf(option) {35		case reflect.TypeOf(""):36			failure.Message = option.(string)37		case reflect.TypeOf(types.CodeLocation{}):38			failure.Location = option.(types.CodeLocation)39		case reflect.TypeOf(ForwardedPanic("")):40			failure.ForwardedPanic = string(option.(ForwardedPanic))41		case reflect.TypeOf(types.FailureNodeInContainer):42			failure.FailureNodeContext = option.(types.FailureNodeContext)43		case reflect.TypeOf(0):44			failure.FailureNodeContainerIndex = option.(int)45		case reflect.TypeOf(FailureNodeLocation{}):46			failure.FailureNodeLocation = types.CodeLocation(option.(FailureNodeLocation))47		case reflect.TypeOf(types.NodeTypeIt):48			failure.FailureNodeType = option.(types.NodeType)49		}50	}51	return failure52}53type STD string54type GW string55// convenience helper to quickly make summaries56func S(options ...interface{}) types.SpecReport {57	report := types.SpecReport{58		LeafNodeType: types.NodeTypeIt,59		State:        types.SpecStatePassed,60		NumAttempts:  1,61		RunTime:      time.Second,62	}63	for _, option := range options {64		switch reflect.TypeOf(option) {65		case reflect.TypeOf([]string{}):66			report.ContainerHierarchyTexts = option.([]string)67		case reflect.TypeOf([]types.CodeLocation{}):68			report.ContainerHierarchyLocations = option.([]types.CodeLocation)69		case reflect.TypeOf([]Labels{}):70			report.ContainerHierarchyLabels = [][]string{}71			for _, labels := range option.([]Labels) {72				report.ContainerHierarchyLabels = append(report.ContainerHierarchyLabels, []string(labels))73			}74		case reflect.TypeOf(""):75			report.LeafNodeText = option.(string)76		case reflect.TypeOf(types.NodeTypeIt):77			report.LeafNodeType = option.(types.NodeType)78		case reflect.TypeOf(types.CodeLocation{}):79			report.LeafNodeLocation = option.(types.CodeLocation)80		case reflect.TypeOf(Labels{}):81			report.LeafNodeLabels = []string(option.(Labels))82		case reflect.TypeOf(types.SpecStatePassed):83			report.State = option.(types.SpecState)84		case reflect.TypeOf(time.Second):85			report.RunTime = option.(time.Duration)86		case reflect.TypeOf(types.Failure{}):87			report.Failure = option.(types.Failure)88		case reflect.TypeOf(0):89			report.NumAttempts = option.(int)90		case reflect.TypeOf(STD("")):91			report.CapturedStdOutErr = string(option.(STD))92		case reflect.TypeOf(GW("")):93			report.CapturedGinkgoWriterOutput = string(option.(GW))94		case reflect.TypeOf(types.ReportEntry{}):95			report.ReportEntries = append(report.ReportEntries, option.(types.ReportEntry))96		}97	}98	if len(report.ContainerHierarchyLabels) == 0 {99		for range report.ContainerHierarchyTexts {100			report.ContainerHierarchyLabels = append(report.ContainerHierarchyLabels, []string{})101		}102	}103	return report104}105func RE(name string, cl types.CodeLocation, args ...interface{}) types.ReportEntry {106	entry, _ := internal.NewReportEntry(name, cl, args...)107	entry.Time = PLACEHOLDER_TIME108	return entry109}110type ConfigFlags uint8111const (112	Succinct ConfigFlags = 1 << iota113	Verbose114	VeryVerbose115	ReportPassed116	FullTrace117)118func (cf ConfigFlags) Has(flag ConfigFlags) bool { return cf&flag != 0 }119func C(flags ...ConfigFlags) types.ReporterConfig {120	f := ConfigFlags(0)121	if len(flags) > 0 {122		f = flags[0]123	}124	Ω(f.Has(Verbose) && f.Has(Succinct)).Should(BeFalse(), "Setting more than one of Succinct, Verbose, or VeryVerbose is a configuration error")125	Ω(f.Has(VeryVerbose) && f.Has(Succinct)).Should(BeFalse(), "Setting more than one of Succinct, Verbose, or VeryVerbose is a configuration error")126	Ω(f.Has(VeryVerbose) && f.Has(Verbose)).Should(BeFalse(), "Setting more than one of Succinct, Verbose, or VeryVerbose is a configuration error")127	return types.ReporterConfig{128		NoColor:                true,129		SlowSpecThreshold:      SlowSpecThreshold,130		Succinct:               f.Has(Succinct),131		Verbose:                f.Has(Verbose),132		VeryVerbose:            f.Has(VeryVerbose),133		AlwaysEmitGinkgoWriter: f.Has(ReportPassed),134		FullTrace:              f.Has(FullTrace),135	}136}137const SlowSpecThreshold = 3 * time.Second138var _ = Describe("DefaultReporter", func() {139	var DENOTER = "•"140	var RETRY_DENOTER = "↺"141	if runtime.GOOS == "windows" {142		DENOTER = "+"143		RETRY_DENOTER = "R"144	}145	var buf *gbytes.Buffer146	verifyExpectedOutput := func(expected []string) {147		if len(expected) == 0 {148			ExpectWithOffset(1, buf.Contents()).Should(BeEmpty())149		} else {150			ExpectWithOffset(1, string(buf.Contents())).Should(Equal(strings.Join(expected, "\n")), test_helpers.MultilneTextHelper(string(buf.Contents())))151		}152	}153	BeforeEach(func() {154		buf = gbytes.NewBuffer()155		format.CharactersAroundMismatchToInclude = 100156	})157	DescribeTable("Rendering SuiteWillBegin",158		func(conf types.ReporterConfig, report types.Report, expected ...string) {159			reporter := reporters.NewDefaultReporterUnderTest(conf, buf)160			reporter.SuiteWillBegin(report)161			verifyExpectedOutput(expected)162		},163		Entry("Default Behavior",164			C(),165			types.Report{166				SuiteDescription: "My Suite", SuitePath: "/path/to/suite", PreRunStats: types.PreRunStats{SpecsThatWillRun: 15, TotalSpecs: 20},167				SuiteConfig: types.SuiteConfig{RandomSeed: 17, ParallelTotal: 1},168			},169			"Running Suite: My Suite - /path/to/suite",170			"========================================",171			"Random Seed: {{bold}}17{{/}}",172			"",173			"Will run {{bold}}15{{/}} of {{bold}}20{{/}} specs",174			"",175		),176		Entry("With Labels",177			C(),178			types.Report{179				SuiteDescription: "My Suite", SuitePath: "/path/to/suite", SuiteLabels: []string{"dog", "fish"}, PreRunStats: types.PreRunStats{SpecsThatWillRun: 15, TotalSpecs: 20},180				SuiteConfig: types.SuiteConfig{RandomSeed: 17, ParallelTotal: 1},181			},182			"Running Suite: My Suite - /path/to/suite",183			"{{coral}}[dog, fish]{{/}} ",184			"========================================",185			"Random Seed: {{bold}}17{{/}}",186			"",187			"Will run {{bold}}15{{/}} of {{bold}}20{{/}} specs",188			"",189		),190		Entry("With long Labels",191			C(),192			types.Report{193				SuiteDescription: "My Suite", SuitePath: "/path/to/suite", SuiteLabels: []string{"dog", "fish", "kalamazoo", "kangaroo", "chicken", "asparagus"}, PreRunStats: types.PreRunStats{SpecsThatWillRun: 15, TotalSpecs: 20},194				SuiteConfig: types.SuiteConfig{RandomSeed: 17, ParallelTotal: 1},195			},196			"Running Suite: My Suite - /path/to/suite",197			"{{coral}}[dog, fish, kalamazoo, kangaroo, chicken, asparagus]{{/}} ",198			"====================================================",199			"Random Seed: {{bold}}17{{/}}",200			"",201			"Will run {{bold}}15{{/}} of {{bold}}20{{/}} specs",202			"",203		),204		Entry("When configured to randomize all specs",205			C(),206			types.Report{207				SuiteDescription: "My Suite", SuitePath: "/path/to/suite", PreRunStats: types.PreRunStats{SpecsThatWillRun: 15, TotalSpecs: 20},208				SuiteConfig: types.SuiteConfig{RandomSeed: 17, ParallelTotal: 1, RandomizeAllSpecs: true},209			},210			"Running Suite: My Suite - /path/to/suite",211			"========================================",212			"Random Seed: {{bold}}17{{/}} - will randomize all specs",213			"",214			"Will run {{bold}}15{{/}} of {{bold}}20{{/}} specs",215			"",216		),217		Entry("when configured to run in parallel",218			C(),219			types.Report{220				SuiteDescription: "My Suite", SuitePath: "/path/to/suite", PreRunStats: types.PreRunStats{SpecsThatWillRun: 15, TotalSpecs: 20},221				SuiteConfig: types.SuiteConfig{RandomSeed: 17, ParallelTotal: 3},222			},223			"Running Suite: My Suite - /path/to/suite",224			"========================================",225			"Random Seed: {{bold}}17{{/}}",226			"",227			"Will run {{bold}}15{{/}} of {{bold}}20{{/}} specs",228			"Running in parallel across {{bold}}3{{/}} processes",229			"",230		),231		Entry("when succinct and in series",232			C(Succinct),233			types.Report{234				SuiteDescription: "My Suite", SuitePath: "/path/to/suite", PreRunStats: types.PreRunStats{SpecsThatWillRun: 15, TotalSpecs: 20},235				SuiteConfig: types.SuiteConfig{RandomSeed: 17, ParallelTotal: 1},236			},237			"[17] {{bold}}My Suite{{/}} - 15/20 specs ",238		),239		Entry("when succinct and in parallel",240			C(Succinct),241			types.Report{242				SuiteDescription: "My Suite", SuitePath: "/path/to/suite", PreRunStats: types.PreRunStats{SpecsThatWillRun: 15, TotalSpecs: 20},243				SuiteConfig: types.SuiteConfig{RandomSeed: 17, ParallelTotal: 3},244			},245			"[17] {{bold}}My Suite{{/}} - 15/20 specs - 3 procs ",246		),247		Entry("when succinct and with labels",248			C(Succinct),249			types.Report{250				SuiteDescription: "My Suite", SuitePath: "/path/to/suite", SuiteLabels: Label("dog, fish"), PreRunStats: types.PreRunStats{SpecsThatWillRun: 15, TotalSpecs: 20},251				SuiteConfig: types.SuiteConfig{RandomSeed: 17, ParallelTotal: 3},252			},253			"[17] {{bold}}My Suite{{/}} {{coral}}[dog, fish]{{/}} - 15/20 specs - 3 procs ",254		),255	)256	DescribeTable("WillRun",257		func(conf types.ReporterConfig, report types.SpecReport, output ...string) {258			reporter := reporters.NewDefaultReporterUnderTest(conf, buf)259			reporter.WillRun(report)260			verifyExpectedOutput(output)261		},262		Entry("when not verbose, it emits nothing", C(), S(CTS("A"), CLS(cl0))),263		Entry("pending specs are not emitted", C(Verbose), S(types.SpecStatePending)),264		Entry("skipped specs are not emitted", C(Verbose), S(types.SpecStateSkipped)),265		Entry("setup nodes", C(Verbose),266			S(types.NodeTypeBeforeSuite, cl0),267			DELIMITER,268			"{{bold}}[BeforeSuite] {{/}}",269			"{{gray}}"+cl0.String()+"{{/}}",270			"",271		),272		Entry("ReportAfterSuite nodes", C(Verbose),273			S("my report", cl0, types.NodeTypeReportAfterSuite),274			DELIMITER,275			"{{bold}}[ReportAfterSuite] my report{{/}}",276			"{{gray}}"+cl0.String()+"{{/}}",277			"",278		),279		Entry("top-level it nodes", C(Verbose),280			S("My Test", cl0),281			DELIMITER,282			"{{bold}}My Test{{/}}",283			"{{gray}}"+cl0.String()+"{{/}}",284			"",285		),286		Entry("nested it nodes", C(Verbose),287			S(CTS("Container", "Nested Container"), "My Test", CLS(cl0, cl1), cl2),288			DELIMITER,289			"{{/}}Container {{gray}}Nested Container{{/}}",290			"  {{bold}}My Test{{/}}",291			"  {{gray}}"+cl2.String()+"{{/}}",292			"",293		),294		Entry("specs with labels", C(Verbose),295			S(CTS("Container", "Nested Container"), "My Test", CLS(cl0, cl1), cl2, CLabels(Label("dog", "cat"), Label("cat", "fruit")), Label("giraffe", "gorilla", "cat")),296			DELIMITER,297			"{{/}}Container {{gray}}Nested Container{{/}}",298			"  {{bold}}My Test{{/}} {{coral}}[dog, cat, fruit, giraffe, gorilla]{{/}}",299			"  {{gray}}"+cl2.String()+"{{/}}",300			"",301		),302	)303	DescribeTable("DidRun",304		func(conf types.ReporterConfig, report types.SpecReport, output ...string) {305			reporter := reporters.NewDefaultReporterUnderTest(conf, buf)306			reporter.DidRun(report)307			verifyExpectedOutput(output)308		},309		// Passing Tests310		Entry("a passing test",311			C(),312			S("A", cl0),313			"{{green}}"+DENOTER+"{{/}}",314		),315		Entry("a passing test that was retried",316			C(),317			S(CTS("A"), "B", CLS(cl0), cl1, 2),318			DELIMITER,319			"{{green}}"+RETRY_DENOTER+" [FLAKEY TEST - TOOK 2 ATTEMPTS TO PASS] [1.000 seconds]{{/}}",320			"{{/}}A {{gray}}B{{/}}",321			"{{gray}}"+cl1.String()+"{{/}}",322			DELIMITER,323			"",324		),325		Entry("a passing test that has ginkgo writer output and/or non-visible report entries",326			C(),327			S("A", cl0, GW("GINKGO-WRITER-OUTPUT"), RE("fail-report-name", cl1, types.ReportEntryVisibilityFailureOrVerbose), RE("hidden-report-name", cl2, types.ReportEntryVisibilityNever)),328			"{{green}}"+DENOTER+"{{/}}",329		),330		Entry("a passing test that has ginkgo writer output, with ReportPassed configured",331			C(ReportPassed),332			S(CTS("A"), "B", CLS(cl0), cl1, GW("GINKGO-WRITER-OUTPUT\nSHOULD EMIT")),333			DELIMITER,334			"{{green}}"+DENOTER+" [1.000 seconds]{{/}}",335			"{{/}}A {{gray}}B{{/}}",336			"{{gray}}"+cl1.String()+"{{/}}",337			"",338			"  {{gray}}Begin Captured GinkgoWriter Output >>{{/}}",339			"    GINKGO-WRITER-OUTPUT",340			"    SHOULD EMIT",341			"  {{gray}}<< End Captured GinkgoWriter Output{{/}}",342			DELIMITER,343			"",344		),345		Entry("a passing test that has ginkgo writer output and a FailurOrVerbose entry, with Verbose configured",346			C(Verbose),347			S("A", cl0, GW("GINKGO-WRITER-OUTPUT\nSHOULD EMIT"), RE("failure-or-verbose-report-name", cl1, types.ReportEntryVisibilityFailureOrVerbose), RE("hidden-report-name", cl2, types.ReportEntryVisibilityNever)),348			DELIMITER,349			"{{green}}"+DENOTER+" [1.000 seconds]{{/}}",350			"A",351			"{{gray}}"+cl0.String()+"{{/}}",352			"",353			"  {{gray}}Begin Captured GinkgoWriter Output >>{{/}}",354			"    GINKGO-WRITER-OUTPUT",355			"    SHOULD EMIT",356			"  {{gray}}<< End Captured GinkgoWriter Output{{/}}",357			"",358			"  {{gray}}Begin Report Entries >>{{/}}",359			"    {{bold}}failure-or-verbose-report-name{{gray}} - "+cl1.String()+" @ "+FORMATTED_TIME+"{{/}}",360			"  {{gray}}<< End Report Entries{{/}}",361			DELIMITER,362			"",363		),364		Entry("a slow passing test",365			C(),366			S(CTS("A"), "B", CLS(cl0), cl1, time.Minute, GW("GINKGO-WRITER-OUTPUT")),367			DELIMITER,368			"{{green}}"+DENOTER+" [SLOW TEST] [60.000 seconds]{{/}}",369			"{{/}}A {{gray}}B{{/}}",370			"{{gray}}"+cl1.String()+"{{/}}",371			DELIMITER,372			"",373		),374		Entry("a passing test with captured stdout",375			C(),376			S(CTS("A"), "B", CLS(cl0), cl1, GW("GINKGO-WRITER-OUTPUT"), STD("STD-OUTPUT\nSHOULD EMIT")),377			DELIMITER,378			"{{green}}"+DENOTER+" [1.000 seconds]{{/}}",379			"{{/}}A {{gray}}B{{/}}",380			"{{gray}}"+cl1.String()+"{{/}}",381			"",382			"  {{gray}}Begin Captured StdOut/StdErr Output >>{{/}}",383			"    STD-OUTPUT",384			"    SHOULD EMIT",385			"  {{gray}}<< End Captured StdOut/StdErr Output{{/}}",386			DELIMITER,387			"",388		),389		Entry("a passing test with a ReportEntry that is always visible",390			C(),391			S(CTS("A"), "B", CLS(cl0), cl1, GW("GINKGO-WRITER-OUTPUT"), RE("report-name", cl2, "report-content"), RE("other-report-name", cl3), RE("fail-report-name", cl4, types.ReportEntryVisibilityFailureOrVerbose)),392			DELIMITER,393			"{{green}}"+DENOTER+" [1.000 seconds]{{/}}",394			"{{/}}A {{gray}}B{{/}}",395			"{{gray}}"+cl1.String()+"{{/}}",396			"",397			"  {{gray}}Begin Report Entries >>{{/}}",398			"    {{bold}}report-name{{gray}} - "+cl2.String()+" @ "+FORMATTED_TIME+"{{/}}",399			"      report-content",400			"    {{bold}}other-report-name{{gray}} - "+cl3.String()+" @ "+FORMATTED_TIME+"{{/}}",401			"  {{gray}}<< End Report Entries{{/}}",402			DELIMITER,403			"",404		),405		Entry("a passing suite setup emits nothing",406			C(),407			S(types.NodeTypeBeforeSuite, cl0, GW("GINKGO-WRITER-OUTPUT")),408		),409		Entry("a passing suite setup with verbose always emits",410			C(Verbose),411			S(types.NodeTypeBeforeSuite, cl0, GW("GINKGO-WRITER-OUTPUT")),412			DELIMITER,413			"{{green}}[BeforeSuite] PASSED [1.000 seconds]{{/}}",414			"[BeforeSuite] ",415			"{{gray}}"+cl0.String()+"{{/}}",416			"",417			"  {{gray}}Begin Captured GinkgoWriter Output >>{{/}}",418			"    GINKGO-WRITER-OUTPUT",419			"  {{gray}}<< End Captured GinkgoWriter Output{{/}}",420			DELIMITER,421			"",422		),423		Entry("a passing suite setup with captured stdout always emits",424			C(),425			S(types.NodeTypeBeforeSuite, cl0, STD("STD-OUTPUT")),426			DELIMITER,427			"{{green}}[BeforeSuite] PASSED [1.000 seconds]{{/}}",428			"{{/}}[BeforeSuite] {{/}}",429			"{{gray}}"+cl0.String()+"{{/}}",430			"",431			"  {{gray}}Begin Captured StdOut/StdErr Output >>{{/}}",432			"    STD-OUTPUT",433			"  {{gray}}<< End Captured StdOut/StdErr Output{{/}}",434			DELIMITER,435			"",436		),437		Entry("a passing ReportAfterSuite emits nothing",438			C(),439			S("my report", types.NodeTypeReportAfterSuite, cl0, GW("GINKGO-WRITER-OUTPUT")),440		),441		Entry("a passing ReportAfterSuite with verbose always emits",442			C(Verbose),443			S("my report", types.NodeTypeReportAfterSuite, cl0, GW("GINKGO-WRITER-OUTPUT")),444			DELIMITER,445			"{{green}}[ReportAfterSuite] PASSED [1.000 seconds]{{/}}",446			"[ReportAfterSuite] my report",447			"{{gray}}"+cl0.String()+"{{/}}",448			"",449			"  {{gray}}Begin Captured GinkgoWriter Output >>{{/}}",450			"    GINKGO-WRITER-OUTPUT",451			"  {{gray}}<< End Captured GinkgoWriter Output{{/}}",452			DELIMITER,453			"",454		),455		Entry("a passing ReportAfterSuite with captured stdout always emits",456			C(),457			S("my report", types.NodeTypeReportAfterSuite, cl0, STD("STD-OUTPUT")),458			DELIMITER,459			"{{green}}[ReportAfterSuite] PASSED [1.000 seconds]{{/}}",460			"{{/}}[ReportAfterSuite] my report{{/}}",461			"{{gray}}"+cl0.String()+"{{/}}",462			"",463			"  {{gray}}Begin Captured StdOut/StdErr Output >>{{/}}",464			"    STD-OUTPUT",465			"  {{gray}}<< End Captured StdOut/StdErr Output{{/}}",466			DELIMITER,467			"",468		),469		Entry("a passing ReportAfterSuite with verbose always emits",470			C(Verbose),471			S("my report", types.NodeTypeReportAfterSuite, cl0, GW("GINKGO-WRITER-OUTPUT")),472			DELIMITER,473			"{{green}}[ReportAfterSuite] PASSED [1.000 seconds]{{/}}",474			"[ReportAfterSuite] my report",475			"{{gray}}"+cl0.String()+"{{/}}",476			"",477			"  {{gray}}Begin Captured GinkgoWriter Output >>{{/}}",478			"    GINKGO-WRITER-OUTPUT",479			"  {{gray}}<< End Captured GinkgoWriter Output{{/}}",480			DELIMITER,481			"",482		),483		Entry("a passing Suite-level DeferCleanup emits nothing",484			C(),485			S(types.NodeTypeCleanupAfterSuite, cl0, GW("GINKGO-WRITER-OUTPUT")),486		),487		Entry("a passing Suite-level DeferCleanup with verbose always emits",488			C(Verbose),489			S(types.NodeTypeCleanupAfterSuite, cl0, GW("GINKGO-WRITER-OUTPUT")),490			DELIMITER,491			"{{green}}[DeferCleanup (Suite)] PASSED [1.000 seconds]{{/}}",492			"[DeferCleanup (Suite)] ",493			"{{gray}}cl0.go:12{{/}}",494			"",495			"  {{gray}}Begin Captured GinkgoWriter Output >>{{/}}",496			"    GINKGO-WRITER-OUTPUT",497			"  {{gray}}<< End Captured GinkgoWriter Output{{/}}",498			DELIMITER,499			"",500		),501		// Pending Tests502		Entry("a pending test when succinct",503			C(Succinct),504			S("A", cl0, types.SpecStatePending, GW("GW-OUTPUT"), STD("STD-OUTPUT")),505			"{{yellow}}P{{/}}",506		),507		Entry("a pending test normally",508			C(),509			S("A", cl0, types.SpecStatePending, GW("GW-OUTPUT")),510			DELIMITER,511			"{{yellow}}P [PENDING]{{/}}",512			"{{/}}A{{/}}",513			"{{gray}}cl0.go:12{{/}}",514			DELIMITER,515			"",516		),517		Entry("a pending test when verbose",518			C(Verbose),519			S("A", cl0, types.SpecStatePending, GW("GW-OUTPUT")),520			DELIMITER,521			"{{yellow}}P [PENDING]{{/}}",522			"{{/}}A{{/}}",523			"{{gray}}cl0.go:12{{/}}",524			DELIMITER,525			"",526		),527		Entry("a pending test when very verbose",528			C(VeryVerbose),529			S(CTS("A"), "B", CLS(cl0), cl1, types.SpecStatePending, GW("GW-OUTPUT"), STD("STD-OUTPUT")),530			DELIMITER,531			"{{yellow}}P [PENDING]{{/}}",532			"A",533			"{{gray}}"+cl0.String()+"{{/}}",534			"  B",535			"  {{gray}}"+cl1.String()+"{{/}}",536			"",537			"  {{gray}}Begin Captured StdOut/StdErr Output >>{{/}}",538			"    STD-OUTPUT",539			"  {{gray}}<< End Captured StdOut/StdErr Output{{/}}",540			DELIMITER,541			"",542		),543		// Skipped Tests544		Entry("a skipped test without a failure message when succinct",545			C(Succinct),546			S("A", cl0, types.SpecStateSkipped, GW("GW-OUTPUT")),547			"{{cyan}}S{{/}}",548		),549		Entry("a skipped test without a failure message",550			C(),551			S("A", cl0, types.SpecStateSkipped, GW("GW-OUTPUT")),552			"{{cyan}}S{{/}}",553		),554		Entry("a skipped test without a failure message when verbose",555			C(Verbose),556			S("A", cl0, types.SpecStateSkipped, GW("GW-OUTPUT")),557			"{{cyan}}S{{/}}",558		),559		Entry("a skipped test without a failure message when very verbose",560			C(VeryVerbose),561			S("A", cl0, types.SpecStateSkipped, GW("GW-OUTPUT")),562			"{{gray}}------------------------------{{/}}",563			"{{cyan}}S [SKIPPED] [1.000 seconds]{{/}}",564			"A",565			"{{gray}}cl0.go:12{{/}}",566			"",567			"  {{gray}}Begin Captured GinkgoWriter Output >>{{/}}",568			"    GW-OUTPUT",569			"  {{gray}}<< End Captured GinkgoWriter Output{{/}}",570			"{{gray}}------------------------------{{/}}",571			"",572		),573		Entry("a skipped test with a failure message when succinct",574			C(Succinct),575			S(CTS("A"), "B", CLS(cl0), cl1, types.SpecStateSkipped, GW("GW-OUTPUT"), STD("STD-OUTPUT"),576				F("user skipped", types.FailureNodeIsLeafNode, types.NodeTypeIt, FailureNodeLocation(cl1), cl2),577			),578			DELIMITER,579			"{{cyan}}S [SKIPPED] [1.000 seconds]{{/}}",580			"{{/}}A {{gray}}{{cyan}}{{bold}}[It] B{{/}}{{/}}",581			"{{gray}}"+cl1.String()+"{{/}}",582			"",583			"  {{gray}}Begin Captured StdOut/StdErr Output >>{{/}}",584			"    STD-OUTPUT",585			"  {{gray}}<< End Captured StdOut/StdErr Output{{/}}",586			"",587			"  {{gray}}Begin Captured GinkgoWriter Output >>{{/}}",588			"    GW-OUTPUT",589			"  {{gray}}<< End Captured GinkgoWriter Output{{/}}",590			"",591			"  {{cyan}}user skipped{{/}}",592			"  {{cyan}}In {{bold}}[It]{{/}}{{cyan}} at: {{bold}}"+cl2.String()+"{{/}}",593			DELIMITER,594			"",595		),596		Entry("a skipped test with a failure message and normal verbosity",597			C(),598			S(CTS("A"), "B", CLS(cl0), cl1, types.SpecStateSkipped, GW("GW-OUTPUT"), STD("STD-OUTPUT"),599				F("user skipped", types.FailureNodeIsLeafNode, types.NodeTypeIt, FailureNodeLocation(cl1), cl2),600			),601			DELIMITER,602			"{{cyan}}S [SKIPPED] [1.000 seconds]{{/}}",603			"A",604			"{{gray}}"+cl0.String()+"{{/}}",605			"  {{cyan}}{{bold}}[It] B{{/}}",606			"  {{gray}}"+cl1.String()+"{{/}}",607			"",608			"  {{gray}}Begin Captured StdOut/StdErr Output >>{{/}}",609			"    STD-OUTPUT",610			"  {{gray}}<< End Captured StdOut/StdErr Output{{/}}",611			"",612			"  {{gray}}Begin Captured GinkgoWriter Output >>{{/}}",613			"    GW-OUTPUT",614			"  {{gray}}<< End Captured GinkgoWriter Output{{/}}",615			"",616			"  {{cyan}}user skipped{{/}}",617			"  {{cyan}}In {{bold}}[It]{{/}}{{cyan}} at: {{bold}}"+cl2.String()+"{{/}}",618			DELIMITER,619			"",620		),621		Entry("a skipped test with a failure message and verbose",622			C(Verbose),623			S(CTS("A"), "B", CLS(cl0), cl1, types.SpecStateSkipped, GW("GW-OUTPUT"), STD("STD-OUTPUT"),624				F("user skipped", types.FailureNodeIsLeafNode, types.NodeTypeIt, FailureNodeLocation(cl1), cl2),625			),626			DELIMITER,627			"{{cyan}}S [SKIPPED] [1.000 seconds]{{/}}",628			"A",629			"{{gray}}"+cl0.String()+"{{/}}",630			"  {{cyan}}{{bold}}[It] B{{/}}",631			"  {{gray}}"+cl1.String()+"{{/}}",632			"",633			"  {{gray}}Begin Captured StdOut/StdErr Output >>{{/}}",634			"    STD-OUTPUT",635			"  {{gray}}<< End Captured StdOut/StdErr Output{{/}}",636			"",637			"  {{gray}}Begin Captured GinkgoWriter Output >>{{/}}",638			"    GW-OUTPUT",639			"  {{gray}}<< End Captured GinkgoWriter Output{{/}}",640			"",641			"  {{cyan}}user skipped{{/}}",642			"  {{cyan}}In {{bold}}[It]{{/}}{{cyan}} at: {{bold}}"+cl2.String()+"{{/}}",643			DELIMITER,644			"",645		),646		Entry("a skipped test with a failure message and very verbose",647			C(VeryVerbose),648			S(CTS("A"), "B", CLS(cl0), cl1, types.SpecStateSkipped, GW("GW-OUTPUT"), STD("STD-OUTPUT"),649				F("user skipped", types.FailureNodeIsLeafNode, types.NodeTypeIt, FailureNodeLocation(cl1), cl2),650			),651			DELIMITER,652			"{{cyan}}S [SKIPPED] [1.000 seconds]{{/}}",653			"A",654			"{{gray}}"+cl0.String()+"{{/}}",655			"  {{cyan}}{{bold}}[It] B{{/}}",656			"  {{gray}}"+cl1.String()+"{{/}}",657			"",658			"  {{gray}}Begin Captured StdOut/StdErr Output >>{{/}}",659			"    STD-OUTPUT",660			"  {{gray}}<< End Captured StdOut/StdErr Output{{/}}",661			"",662			"  {{gray}}Begin Captured GinkgoWriter Output >>{{/}}",663			"    GW-OUTPUT",664			"  {{gray}}<< End Captured GinkgoWriter Output{{/}}",665			"",666			"  {{cyan}}user skipped{{/}}",667			"  {{cyan}}In {{bold}}[It]{{/}}{{cyan}} at: {{bold}}"+cl2.String()+"{{/}}",668			DELIMITER,669			"",670		),671		//Failed tests672		Entry("when a test has failed in an It",673			C(),674			S(CTS("Describe A", "Context B"), "The Test", CLS(cl0, cl1), cl2, CLabels(Label("dog", "cat"), Label("cat", "cow")),675				types.SpecStateFailed, 2,676				Label("cow", "fish"),677				GW("GW-OUTPUT\nIS EMITTED"), STD("STD-OUTPUT\nIS EMITTED"),678				F("FAILURE MESSAGE\nWITH DETAILS", types.FailureNodeIsLeafNode, types.NodeTypeIt, FailureNodeLocation(cl2), cl3),679				RE("report-name", cl4, "report-content"),680				RE("fail-report-name", cl4, "fail-report-content", types.ReportEntryVisibilityFailureOrVerbose),681				RE("hidden-report-name", cl4, "hidden-report-content", types.ReportEntryVisibilityNever),682			),683			DELIMITER,684			"{{red}}"+DENOTER+" [FAILED] [1.000 seconds]{{/}}",685			"Describe A {{coral}}[dog, cat]{{/}}",686			"{{gray}}"+cl0.String()+"{{/}}",687			"  Context B {{coral}}[cat, cow]{{/}}",688			"  {{gray}}"+cl1.String()+"{{/}}",689			"    {{red}}{{bold}}[It] The Test{{/}} {{coral}}[cow, fish]{{/}}",690			"    {{gray}}"+cl2.String()+"{{/}}",691			"",692			"  {{gray}}Begin Captured StdOut/StdErr Output >>{{/}}",693			"    STD-OUTPUT",694			"    IS EMITTED",695			"  {{gray}}<< End Captured StdOut/StdErr Output{{/}}",696			"",697			"  {{gray}}Begin Captured GinkgoWriter Output >>{{/}}",698			"    GW-OUTPUT",699			"    IS EMITTED",700			"  {{gray}}<< End Captured GinkgoWriter Output{{/}}",701			"",702			"  {{gray}}Begin Report Entries >>{{/}}",703			"    {{bold}}report-name{{gray}} - "+cl4.String()+" @ "+FORMATTED_TIME+"{{/}}",704			"      report-content",705			"    {{bold}}fail-report-name{{gray}} - "+cl4.String()+" @ "+FORMATTED_TIME+"{{/}}",706			"      fail-report-content",707			"  {{gray}}<< End Report Entries{{/}}",708			"",709			"  {{red}}FAILURE MESSAGE",710			"  WITH DETAILS{{/}}",711			"  {{red}}In {{bold}}[It]{{/}}{{red}} at: {{bold}}"+cl3.String()+"{{/}}",712			DELIMITER,713			"",714		),715		Entry("when a test has failed in a setup/teardown node",716			C(),717			S(CTS("Describe A", "Context B"), "The Test", CLS(cl0, cl1), cl2,718				types.SpecStateFailed, 2,719				GW("GW-OUTPUT\nIS EMITTED"), STD("STD-OUTPUT\nIS EMITTED"),720				F("FAILURE MESSAGE\nWITH DETAILS", types.FailureNodeInContainer, FailureNodeLocation(cl3), types.NodeTypeJustBeforeEach, 1, cl4),721			),722			DELIMITER,723			"{{red}}"+DENOTER+" [FAILED] [1.000 seconds]{{/}}",724			"Describe A",725			"{{gray}}"+cl0.String()+"{{/}}",726			"  {{red}}{{bold}}Context B [JustBeforeEach]{{/}}",727			"  {{gray}}"+cl3.String()+"{{/}}",728			"    The Test",729			"    {{gray}}"+cl2.String()+"{{/}}",730			"",731			"  {{gray}}Begin Captured StdOut/StdErr Output >>{{/}}",732			"    STD-OUTPUT",733			"    IS EMITTED",734			"  {{gray}}<< End Captured StdOut/StdErr Output{{/}}",735			"",736			"  {{gray}}Begin Captured GinkgoWriter Output >>{{/}}",737			"    GW-OUTPUT",738			"    IS EMITTED",739			"  {{gray}}<< End Captured GinkgoWriter Output{{/}}",740			"",741			"  {{red}}FAILURE MESSAGE",742			"  WITH DETAILS{{/}}",743			"  {{red}}In {{bold}}[JustBeforeEach]{{/}}{{red}} at: {{bold}}"+cl4.String()+"{{/}}",744			DELIMITER,745			"",746		),747		Entry("when a test has failed in a setup/teardown node defined at the top level",748			C(),749			S(CTS("Describe A", "Context B"), "The Test", CLS(cl0, cl1), cl2,750				types.SpecStateFailed, 2,751				GW("GW-OUTPUT\nIS EMITTED"), STD("STD-OUTPUT\nIS EMITTED"),752				F("FAILURE MESSAGE\nWITH DETAILS", types.FailureNodeAtTopLevel, FailureNodeLocation(cl3), types.NodeTypeJustBeforeEach, 1, cl4),753			),754			DELIMITER,755			"{{red}}"+DENOTER+" [FAILED] [1.000 seconds]{{/}}",756			"{{red}}{{bold}}TOP-LEVEL [JustBeforeEach]{{/}}",757			"{{gray}}"+cl3.String()+"{{/}}",758			"  Describe A",759			"  {{gray}}"+cl0.String()+"{{/}}",760			"    Context B",761			"    {{gray}}"+cl1.String()+"{{/}}",762			"      The Test",763			"      {{gray}}"+cl2.String()+"{{/}}",764			"",765			"  {{gray}}Begin Captured StdOut/StdErr Output >>{{/}}",766			"    STD-OUTPUT",767			"    IS EMITTED",768			"  {{gray}}<< End Captured StdOut/StdErr Output{{/}}",769			"",770			"  {{gray}}Begin Captured GinkgoWriter Output >>{{/}}",771			"    GW-OUTPUT",772			"    IS EMITTED",773			"  {{gray}}<< End Captured GinkgoWriter Output{{/}}",774			"",775			"  {{red}}FAILURE MESSAGE",776			"  WITH DETAILS{{/}}",777			"  {{red}}In {{bold}}[JustBeforeEach]{{/}}{{red}} at: {{bold}}"+cl4.String()+"{{/}}",778			DELIMITER,779			""),780		Entry("when a test has failed in a setup/teardown node and Succinct is configured",781			C(Succinct),782			S(CTS("Describe A", "Context B"), "The Test", CLS(cl0, cl1), cl2,783				types.SpecStateFailed, 2,784				GW("GW-OUTPUT\nIS EMITTED"), STD("STD-OUTPUT\nIS EMITTED"),785				F("FAILURE MESSAGE\nWITH DETAILS", types.FailureNodeInContainer, FailureNodeLocation(cl3), types.NodeTypeJustBeforeEach, 1, cl4),786			),787			DELIMITER,788			"{{red}}"+DENOTER+" [FAILED] [1.000 seconds]{{/}}",789			"{{/}}Describe A {{gray}}{{red}}{{bold}}Context B [JustBeforeEach]{{/}} {{/}}The Test{{/}}",790			"{{gray}}"+cl2.String()+"{{/}}",791			"",792			"  {{gray}}Begin Captured StdOut/StdErr Output >>{{/}}",793			"    STD-OUTPUT",794			"    IS EMITTED",795			"  {{gray}}<< End Captured StdOut/StdErr Output{{/}}",796			"",797			"  {{gray}}Begin Captured GinkgoWriter Output >>{{/}}",798			"    GW-OUTPUT",799			"    IS EMITTED",800			"  {{gray}}<< End Captured GinkgoWriter Output{{/}}",801			"",802			"  {{red}}FAILURE MESSAGE",803			"  WITH DETAILS{{/}}",804			"  {{red}}In {{bold}}[JustBeforeEach]{{/}}{{red}} at: {{bold}}"+cl4.String()+"{{/}}",805			DELIMITER,806			"",807		),808		Entry("when a test has failed and FullTrace is configured",809			C(FullTrace),810			S(CTS("Describe A", "Context B"), "The Test", CLS(cl0, cl1), cl2,811				types.SpecStateFailed, 2,812				GW("GW-OUTPUT\nIS EMITTED"), STD("STD-OUTPUT\nIS EMITTED"),813				F("FAILURE MESSAGE\nWITH DETAILS", types.FailureNodeInContainer, FailureNodeLocation(cl3), types.NodeTypeJustBeforeEach, 1, cl4),814			),815			DELIMITER,816			"{{red}}"+DENOTER+" [FAILED] [1.000 seconds]{{/}}",817			"Describe A",818			"{{gray}}"+cl0.String()+"{{/}}",819			"  {{red}}{{bold}}Context B [JustBeforeEach]{{/}}",820			"  {{gray}}"+cl3.String()+"{{/}}",821			"    The Test",822			"    {{gray}}"+cl2.String()+"{{/}}",823			"",824			"  {{gray}}Begin Captured StdOut/StdErr Output >>{{/}}",825			"    STD-OUTPUT",826			"    IS EMITTED",827			"  {{gray}}<< End Captured StdOut/StdErr Output{{/}}",828			"",829			"  {{gray}}Begin Captured GinkgoWriter Output >>{{/}}",830			"    GW-OUTPUT",831			"    IS EMITTED",832			"  {{gray}}<< End Captured GinkgoWriter Output{{/}}",833			"",834			"  {{red}}FAILURE MESSAGE",835			"  WITH DETAILS{{/}}",836			"  {{red}}In {{bold}}[JustBeforeEach]{{/}}{{red}} at: {{bold}}"+cl4.String()+"{{/}}",837			"",838			"  {{red}}Full Stack Trace{{/}}",839			"    full-trace",840			"    cl-4",841			DELIMITER,842			"",843		),844		Entry("when a suite setup node has failed",845			C(),846			S(types.NodeTypeSynchronizedBeforeSuite, cl0, types.SpecStateFailed, 1,847				GW("GW-OUTPUT\nIS EMITTED"), STD("STD-OUTPUT\nIS EMITTED"),848				F("FAILURE MESSAGE\nWITH DETAILS", types.FailureNodeIsLeafNode, FailureNodeLocation(cl0), types.NodeTypeSynchronizedBeforeSuite, 1, cl1),849			),850			DELIMITER,851			"{{red}}[SynchronizedBeforeSuite] [FAILED] [1.000 seconds]{{/}}",852			"{{red}}{{bold}}[SynchronizedBeforeSuite] {{/}}",853			"{{gray}}"+cl0.String()+"{{/}}",854			"",855			"  {{gray}}Begin Captured StdOut/StdErr Output >>{{/}}",856			"    STD-OUTPUT",857			"    IS EMITTED",858			"  {{gray}}<< End Captured StdOut/StdErr Output{{/}}",859			"",860			"  {{gray}}Begin Captured GinkgoWriter Output >>{{/}}",861			"    GW-OUTPUT",862			"    IS EMITTED",863			"  {{gray}}<< End Captured GinkgoWriter Output{{/}}",864			"",865			"  {{red}}FAILURE MESSAGE",866			"  WITH DETAILS{{/}}",867			"  {{red}}In {{bold}}[SynchronizedBeforeSuite]{{/}}{{red}} at: {{bold}}"+cl1.String()+"{{/}}",868			DELIMITER,869			"",870		),871		Entry("when a ReportAfterSuite node has failed",872			C(),873			S("my report", cl0, types.NodeTypeReportAfterSuite, types.SpecStateFailed, 1,874				GW("GW-OUTPUT\nIS EMITTED"), STD("STD-OUTPUT\nIS EMITTED"),875				F("FAILURE MESSAGE\nWITH DETAILS", types.FailureNodeIsLeafNode, FailureNodeLocation(cl0), types.NodeTypeReportAfterSuite, 1, cl1),876			),877			DELIMITER,878			"{{red}}[ReportAfterSuite] [FAILED] [1.000 seconds]{{/}}",879			"{{red}}{{bold}}[ReportAfterSuite] my report{{/}}",880			"{{gray}}"+cl0.String()+"{{/}}",881			"",882			"  {{gray}}Begin Captured StdOut/StdErr Output >>{{/}}",883			"    STD-OUTPUT",884			"    IS EMITTED",885			"  {{gray}}<< End Captured StdOut/StdErr Output{{/}}",886			"",887			"  {{gray}}Begin Captured GinkgoWriter Output >>{{/}}",888			"    GW-OUTPUT",889			"    IS EMITTED",890			"  {{gray}}<< End Captured GinkgoWriter Output{{/}}",891			"",892			"  {{red}}FAILURE MESSAGE",893			"  WITH DETAILS{{/}}",894			"  {{red}}In {{bold}}[ReportAfterSuite]{{/}}{{red}} at: {{bold}}"+cl1.String()+"{{/}}",895			DELIMITER,896			"",897		),898		Entry("when a test has panicked and there is no forwarded panic",899			C(),900			S(CTS("Describe A", "Context B"), "The Test", CLS(cl0, cl1), cl2,901				types.SpecStatePanicked, 2,902				GW("GW-OUTPUT\nIS EMITTED"), STD("STD-OUTPUT\nIS EMITTED"),903				F("FAILURE MESSAGE\nWITH DETAILS", types.FailureNodeInContainer, FailureNodeLocation(cl3), types.NodeTypeJustBeforeEach, 1, cl4),904			),905			DELIMITER,906			"{{magenta}}"+DENOTER+"! [PANICKED] [1.000 seconds]{{/}}",907			"Describe A",908			"{{gray}}"+cl0.String()+"{{/}}",909			"  {{magenta}}{{bold}}Context B [JustBeforeEach]{{/}}",910			"  {{gray}}"+cl3.String()+"{{/}}",911			"    The Test",912			"    {{gray}}"+cl2.String()+"{{/}}",913			"",914			"  {{gray}}Begin Captured StdOut/StdErr Output >>{{/}}",915			"    STD-OUTPUT",916			"    IS EMITTED",917			"  {{gray}}<< End Captured StdOut/StdErr Output{{/}}",918			"",919			"  {{gray}}Begin Captured GinkgoWriter Output >>{{/}}",920			"    GW-OUTPUT",921			"    IS EMITTED",922			"  {{gray}}<< End Captured GinkgoWriter Output{{/}}",923			"",924			"  {{magenta}}FAILURE MESSAGE",925			"  WITH DETAILS{{/}}",926			"  {{magenta}}In {{bold}}[JustBeforeEach]{{/}}{{magenta}} at: {{bold}}"+cl4.String()+"{{/}}",927			DELIMITER,928			"",929		),930		Entry("when a test has panicked and there is a forwarded panic",931			C(),932			S(CTS("Describe A", "Context B"), "The Test", CLS(cl0, cl1), cl2,933				types.SpecStatePanicked, 2,934				GW("GW-OUTPUT\nIS EMITTED"), STD("STD-OUTPUT\nIS EMITTED"),935				F("FAILURE MESSAGE\nWITH DETAILS", types.FailureNodeInContainer, FailureNodeLocation(cl3), types.NodeTypeJustBeforeEach, 1, cl4, ForwardedPanic("the panic\nthusly forwarded")),936			),937			DELIMITER,938			"{{magenta}}"+DENOTER+"! [PANICKED] [1.000 seconds]{{/}}",939			"Describe A",940			"{{gray}}"+cl0.String()+"{{/}}",941			"  {{magenta}}{{bold}}Context B [JustBeforeEach]{{/}}",942			"  {{gray}}"+cl3.String()+"{{/}}",943			"    The Test",944			"    {{gray}}"+cl2.String()+"{{/}}",945			"",946			"  {{gray}}Begin Captured StdOut/StdErr Output >>{{/}}",947			"    STD-OUTPUT",948			"    IS EMITTED",949			"  {{gray}}<< End Captured StdOut/StdErr Output{{/}}",950			"",951			"  {{gray}}Begin Captured GinkgoWriter Output >>{{/}}",952			"    GW-OUTPUT",953			"    IS EMITTED",954			"  {{gray}}<< End Captured GinkgoWriter Output{{/}}",955			"",956			"  {{magenta}}FAILURE MESSAGE",957			"  WITH DETAILS{{/}}",958			"  {{magenta}}In {{bold}}[JustBeforeEach]{{/}}{{magenta}} at: {{bold}}"+cl4.String()+"{{/}}",959			"",960			"  {{magenta}}the panic",961			"  thusly forwarded{{/}}",962			"",963			"  {{magenta}}Full Stack Trace{{/}}",964			"    full-trace",965			"    cl-4",966			DELIMITER,967			"",968		),969		Entry("when a test is interrupted",970			C(),971			S(CTS("Describe A", "Context B"), "The Test", CLS(cl0, cl1), cl2,972				types.SpecStateInterrupted, 2,973				GW("GW-OUTPUT\nIS EMITTED"), STD("STD-OUTPUT\nIS EMITTED"),974				F("FAILURE MESSAGE\nWITH DETAILS", types.FailureNodeInContainer, FailureNodeLocation(cl3), types.NodeTypeJustBeforeEach, 1, cl4),975			),976			DELIMITER,977			"{{orange}}"+DENOTER+"! [INTERRUPTED] [1.000 seconds]{{/}}",978			"Describe A",979			"{{gray}}"+cl0.String()+"{{/}}",980			"  {{orange}}{{bold}}Context B [JustBeforeEach]{{/}}",981			"  {{gray}}"+cl3.String()+"{{/}}",982			"    The Test",983			"    {{gray}}"+cl2.String()+"{{/}}",984			"",985			"  {{gray}}Begin Captured StdOut/StdErr Output >>{{/}}",986			"    STD-OUTPUT",987			"    IS EMITTED",988			"  {{gray}}<< End Captured StdOut/StdErr Output{{/}}",989			"",990			"  {{gray}}Begin Captured GinkgoWriter Output >>{{/}}",991			"    GW-OUTPUT",992			"    IS EMITTED",993			"  {{gray}}<< End Captured GinkgoWriter Output{{/}}",994			"",995			"  {{orange}}FAILURE MESSAGE",996			"  WITH DETAILS{{/}}",997			"  {{orange}}In {{bold}}[JustBeforeEach]{{/}}{{orange}} at: {{bold}}"+cl4.String()+"{{/}}",998			DELIMITER,999			"",1000		),1001		Entry("when a test is aborted",1002			C(),1003			S(CTS("Describe A", "Context B"), "The Test", CLS(cl0, cl1), cl2,1004				types.SpecStateAborted, 2,1005				GW("GW-OUTPUT\nIS EMITTED"), STD("STD-OUTPUT\nIS EMITTED"),1006				F("FAILURE MESSAGE\nWITH DETAILS", types.FailureNodeInContainer, FailureNodeLocation(cl3), types.NodeTypeJustBeforeEach, 1, cl4),1007			),1008			DELIMITER,1009			"{{coral}}"+DENOTER+"! [ABORTED] [1.000 seconds]{{/}}",1010			"Describe A",1011			"{{gray}}"+cl0.String()+"{{/}}",1012			"  {{coral}}{{bold}}Context B [JustBeforeEach]{{/}}",1013			"  {{gray}}"+cl3.String()+"{{/}}",1014			"    The Test",1015			"    {{gray}}"+cl2.String()+"{{/}}",1016			"",1017			"  {{gray}}Begin Captured StdOut/StdErr Output >>{{/}}",1018			"    STD-OUTPUT",1019			"    IS EMITTED",1020			"  {{gray}}<< End Captured StdOut/StdErr Output{{/}}",1021			"",1022			"  {{gray}}Begin Captured GinkgoWriter Output >>{{/}}",1023			"    GW-OUTPUT",1024			"    IS EMITTED",1025			"  {{gray}}<< End Captured GinkgoWriter Output{{/}}",1026			"",1027			"  {{coral}}FAILURE MESSAGE",1028			"  WITH DETAILS{{/}}",1029			"  {{coral}}In {{bold}}[JustBeforeEach]{{/}}{{coral}} at: {{bold}}"+cl4.String()+"{{/}}",1030			DELIMITER,1031			"",1032		))1033	DescribeTable("Rendering SuiteDidEnd",1034		func(conf types.ReporterConfig, report types.Report, expected ...string) {1035			reporter := reporters.NewDefaultReporterUnderTest(conf, buf)1036			reporter.SuiteDidEnd(report)1037			verifyExpectedOutput(expected)1038		},1039		Entry("when configured to be succinct",1040			C(Succinct),1041			types.Report{1042				SuiteSucceeded: true,1043				RunTime:        time.Minute,1044				SpecReports:    types.SpecReports{S()},1045			},1046			" {{green}}SUCCESS!{{/}} 1m0s ",1047		),1048		Entry("the suite passes",1049			C(),1050			types.Report{1051				SuiteSucceeded: true,1052				PreRunStats:    types.PreRunStats{TotalSpecs: 8, SpecsThatWillRun: 8},1053				RunTime:        time.Minute,1054				SpecReports: types.SpecReports{1055					S(types.NodeTypeBeforeSuite),1056					S(types.SpecStatePassed), S(types.SpecStatePassed), S(types.SpecStatePassed),1057					S(types.SpecStatePending), S(types.SpecStatePending),1058					S(types.SpecStateSkipped), S(types.SpecStateSkipped), S(types.SpecStateSkipped),1059					S(types.NodeTypeAfterSuite),1060				},1061			},1062			"",1063			"{{green}}{{bold}}Ran 3 of 8 Specs in 60.000 seconds{{/}}",1064			"{{green}}{{bold}}SUCCESS!{{/}} -- {{green}}{{bold}}3 Passed{{/}} | {{red}}{{bold}}0 Failed{{/}} | {{yellow}}{{bold}}2 Pending{{/}} | {{cyan}}{{bold}}3 Skipped{{/}}",1065			"",1066		),1067		Entry("the suite passes and has flaky specs",1068			C(),1069			types.Report{1070				SuiteSucceeded: true,1071				PreRunStats:    types.PreRunStats{TotalSpecs: 10, SpecsThatWillRun: 8},1072				RunTime:        time.Minute,1073				SpecReports: types.SpecReports{1074					S(types.NodeTypeBeforeSuite),1075					S(types.SpecStatePassed), S(types.SpecStatePassed), S(types.SpecStatePassed),1076					S(types.SpecStatePassed, 3), S(types.SpecStatePassed, 4), //flakey1077					S(types.SpecStatePending), S(types.SpecStatePending),1078					S(types.SpecStateSkipped), S(types.SpecStateSkipped), S(types.SpecStateSkipped),1079					S(types.NodeTypeAfterSuite),1080				},1081			},1082			"",1083			"{{green}}{{bold}}Ran 5 of 10 Specs in 60.000 seconds{{/}}",1084			"{{green}}{{bold}}SUCCESS!{{/}} -- {{green}}{{bold}}5 Passed{{/}} | {{red}}{{bold}}0 Failed{{/}} | {{light-yellow}}{{bold}}2 Flaked{{/}} | {{yellow}}{{bold}}2 Pending{{/}} | {{cyan}}{{bold}}3 Skipped{{/}}",1085			"",1086		),1087		Entry("the suite fails with one failed test",1088			C(),1089			types.Report{1090				SuiteSucceeded: false,1091				PreRunStats:    types.PreRunStats{TotalSpecs: 11, SpecsThatWillRun: 9},1092				RunTime:        time.Minute,1093				SpecReports: types.SpecReports{1094					S(types.NodeTypeBeforeSuite),1095					S(types.SpecStatePassed), S(types.SpecStatePassed), S(types.SpecStatePassed),1096					S(types.SpecStatePassed, 3), S(types.SpecStatePassed, 4), //flakey1097					S(types.SpecStatePending), S(types.SpecStatePending),1098					S(types.SpecStateSkipped), S(types.SpecStateSkipped), S(types.SpecStateSkipped),1099					S(CTS("Describe A", "Context B"), "The Test", CLS(cl0, cl1), cl2,1100						types.SpecStateFailed, 2,1101						F("FAILURE MESSAGE\nWITH DETAILS", types.FailureNodeInContainer, FailureNodeLocation(cl3), types.NodeTypeJustBeforeEach, 1, cl4),1102					),1103					S(types.NodeTypeAfterSuite),1104				},1105			},1106			"",1107			"{{red}}{{bold}}Ran 6 of 11 Specs in 60.000 seconds{{/}}",1108			"{{red}}{{bold}}FAIL!{{/}} -- {{green}}{{bold}}5 Passed{{/}} | {{red}}{{bold}}1 Failed{{/}} | {{light-yellow}}{{bold}}2 Flaked{{/}} | {{yellow}}{{bold}}2 Pending{{/}} | {{cyan}}{{bold}}3 Skipped{{/}}",1109			"",1110		),1111		Entry("the suite fails with multiple failed tests",1112			C(),1113			types.Report{1114				SuiteSucceeded: false,1115				PreRunStats:    types.PreRunStats{TotalSpecs: 13, SpecsThatWillRun: 9},1116				RunTime:        time.Minute,1117				SpecReports: types.SpecReports{1118					S(types.NodeTypeBeforeSuite),1119					S(types.SpecStatePassed), S(types.SpecStatePassed), S(types.SpecStatePassed),1120					S(types.SpecStatePassed, 3), S(types.SpecStatePassed, 4), //flakey1121					S(types.SpecStatePending), S(types.SpecStatePending),1122					S(types.SpecStateSkipped), S(types.SpecStateSkipped), S(types.SpecStateSkipped),1123					S(CTS("Describe A", "Context B"), "The Test", CLS(cl0, cl1), cl2, CLabels(Label("cat", "dog"), Label("dog", "fish")), Label("fish", "giraffe"),1124						types.SpecStateFailed, 2,1125						F("FAILURE MESSAGE\nWITH DETAILS", types.FailureNodeInContainer, FailureNodeLocation(cl3), types.NodeTypeJustBeforeEach, 1, cl4),1126					),1127					S(CTS("Describe A"), "The Test", CLS(cl0), cl1,1128						types.SpecStatePanicked, 2,1129						F("FAILURE MESSAGE\nWITH DETAILS", types.FailureNodeIsLeafNode, FailureNodeLocation(cl1), types.NodeTypeIt, cl2),1130					),1131					S("The Test", cl0,1132						types.SpecStateInterrupted, 2,1133						F("FAILURE MESSAGE\nWITH DETAILS", types.FailureNodeIsLeafNode, FailureNodeLocation(cl0), types.NodeTypeIt, cl1),1134					),1135					S("The Test", cl0,1136						types.SpecStateAborted, 2,1137						F("FAILURE MESSAGE\nWITH DETAILS", types.FailureNodeIsLeafNode, FailureNodeLocation(cl0), types.NodeTypeIt, cl1),1138					),1139					S(types.NodeTypeAfterSuite),1140				},1141			},...

Full Screen

Full Screen

CLS

Using AI Code Generation

copy

Full Screen

1import (2func main() {3	f, err := os.Create("trace.out")4	if err != nil {5		log.Fatal(err)6	}7	defer f.Close()8	if err := trace.Start(f); err != nil {9		log.Fatal(err)10	}11	defer trace.Stop()12	reporters_test()13}14import (15func reporters_test() {16	fmt.Println("I am in reporters_test function")17	time.Sleep(1 * time.Second)18}

Full Screen

Full Screen

CLS

Using AI Code Generation

copy

Full Screen

1import "fmt"2func main() {3    fmt.Println("Hello, 世界")4}5import "fmt"6func main() {7    fmt.Println("Hello, 世界")8}9import "fmt"10func main() {11    fmt.Println("Hello, 世界")12}13import "fmt"14func main() {15    fmt.Println("Hello, 世界")16}17import "fmt"18func main() {19    fmt.Println("Hello, 世界")20}21import "fmt"22func main() {23    fmt.Println("Hello, 世界")24}25import "fmt"26func main() {27    fmt.Println("Hello, 世界")28}29import "fmt"30func main() {31    fmt.Println("Hello, 世界")32}33import "fmt"34func main() {35    fmt.Println("Hello, 世界")36}37import "fmt"38func main() {39    fmt.Println("Hello, 世界")40}41import "fmt"42func main() {43    fmt.Println("Hello, 世界")44}45import "fmt"46func main() {47    fmt.Println("Hello, 世界")48}

Full Screen

Full Screen

CLS

Using AI Code Generation

copy

Full Screen

1import (2func main() {3    fmt.Println("Hello World")4}5import (6func main() {7    fmt.Println("Hello World")8}9import (10func main() {11    fmt.Println("Hello World")12}13import (14func main() {15    fmt.Println("Hello World")16}17import (18func main() {19    fmt.Println("Hello World")20}21import (22func main() {23    fmt.Println("Hello World")24}25import (26func main() {27    fmt.Println("Hello World")28}29import (30func main() {31    fmt.Println("Hello World")32}33import (34func main() {35    fmt.Println("Hello World")36}37import (38func main() {39    fmt.Println("Hello World")40}41import (42func main() {43    fmt.Println("Hello World")44}45import (46func main() {47    fmt.Println("Hello World")48}49import (

Full Screen

Full Screen

CLS

Using AI Code Generation

copy

Full Screen

1import (2func main() {3	var (4	seleniumPath, _ = exec.LookPath("selenium-server-standalone-3.141.59.jar")5	geckoDriverPath, _ = exec.LookPath("geckodriver")6	if seleniumPath == "" {7	}8	if geckoDriverPath == "" {9	}10	opts := []selenium.ServiceOption{11	}12	selenium.SetDebug(true)13	service, err := selenium.NewChromeDriverService(seleniumPath, port, opts...)14	if err != nil {15		log.Fatal(err)16	}17	defer service.Stop()18	caps := selenium.Capabilities{"browserName": "chrome"}19	caps.AddChrome(chrome.Capabilities{20		Args: []string{21		},22	})23	if err != nil {24		log.Fatal(err)25	}26	defer wd.Quit()27	if err != nil {28		log.Fatal(err)29	}

Full Screen

Full Screen

CLS

Using AI Code Generation

copy

Full Screen

1import (2func TestGinkgo(t *testing.T) {3    gomega.RegisterFailHandler(ginkgo.Fail)4    ginkgo.RunSpecs(t, "Ginkgo Suite")5}6var _ = ginkgo.Describe("Ginkgo", func() {7    var (8    ginkgo.BeforeSuite(func() {9        pathToTestPackage, err = gexec.Build("github.com/onsi/ginkgo/integration/_fixtures/cls_test")10        gomega.Expect(err).NotTo(gomega.HaveOccurred())11    })12    ginkgo.AfterSuite(func() {13        gexec.CleanupBuildArtifacts()14    })15    ginkgo.It("should support custom reporters", func() {16        command := exec.Command(pathToTestPackage)17        command.Env = append(os.Environ(), "GINKGO_REPORTER=cls")18        session, err = gexec.Start(command, ginkgo.GinkgoWriter, ginkgo.GinkgoWriter)19        gomega.Expect(err).NotTo(gomega.HaveOccurred())20        gomega.Eventually(session, "10s").Should(gexec.Exit(0))21        gomega.Expect(session.Out.Contents()).To(gomega.ContainSubstring("1 Spec, 0 Failures"))22    })23})24import (

Full Screen

Full Screen

CLS

Using AI Code Generation

copy

Full Screen

1import "fmt"2type reporters_test struct {3}4func (r *reporters_test) Name() string {5}6func (r *reporters_test) Start() {7    fmt.Println("Starting reporter:", r.name)8}9func (r *reporters_test) Stop() {10    fmt.Println("Stopping reporter:", r.name)11}12func main() {13    r := reporters_test{name: "test"}14    r.Start()15    r.Stop()16}17import "fmt"18type reporters_test struct {19}20func (r *reporters_test) Name() string {21}22func (r *reporters_test) Start() {23    fmt.Println("Starting reporter:", r.name)24}25func (r *reporters_test) Stop() {26    fmt.Println("Stopping reporter:", r.name)27}28func main() {29    r := reporters_test{name: "test"}30    r.Start()31    r.Stop()32}33import "fmt"34type reporters_test struct {35}36func (r *reporters_test) Name() string {37}38func (r *reporters_test) Start() {39    fmt.Println("Starting reporter:", r.name)40}41func (r *reporters_test) Stop() {42    fmt.Println("Stopping reporter:", r.name)43}44func main() {45    r := reporters_test{name: "test"}46    r.Start()47    r.Stop()48}49import "fmt"50type reporters_test struct {51}52func (r *reporters_test) Name() string {53}54func (r *reporters_test) Start() {55    fmt.Println("Starting reporter:", r.name)56}57func (r *reporters_test) Stop() {58    fmt.Println("Stopping reporter:", r.name)59}60func main() {61    r := reporters_test{name: "test"}62    r.Start()63    r.Stop()64}65import "fmt"66type reporters_test struct {

Full Screen

Full Screen

CLS

Using AI Code Generation

copy

Full Screen

1import (2func main() {3    fmt.Println("Hello, playground")4    rep := reporters.NewJUnitReporter("test.xml")5    fmt.Println(rep)6}7import (8func main() {9    fmt.Println("Hello, playground")10    rep := reporters.NewJUnitReporter("test.xml")11    fmt.Println(rep)12}13import (14func main() {15    fmt.Println("Hello, playground")16    rep := reporters.NewJUnitReporter("test.xml")17    fmt.Println(rep)18}19import (20func main() {21    fmt.Println("Hello, playground")22    rep := reporters.NewJUnitReporter("test.xml")23    fmt.Println(rep)24}25import (26func main() {27    fmt.Println("Hello, playground")28    rep := reporters.NewJUnitReporter("test.xml")29    fmt.Println(rep)30}31import (32func main()

Full Screen

Full Screen

CLS

Using AI Code Generation

copy

Full Screen

1import (2func main() {3	fmt.Println("Hello World!")4	reporters.CLS()5}6import (7func main() {8	fmt.Println("Hello World!")9	reporters.CLS()10}11panic(0x57d4a0, 0xc0820040d0)12github.com/astaxie/beego/logs.(*Logger).Flush(0x0, 0x0, 0x0)13panic(0x57d4a0, 0xc0820040d0)14github.com/astaxie/beego/logs.(*Logger).Flush(0x0, 0x0, 0x0)15github.com/astaxie/beego/logs.(*Logger).Emergency(0x0, 0x5a1b60, 0x17, 0x0, 0x0, 0x0)16github.com/astaxie/beego/logs.Emergency(0x5a1b60, 0x17, 0x0, 0x0, 0x0)17github.com/astaxie/beego.(*BeeLogger).Emergency(

Full Screen

Full Screen

CLS

Using AI Code Generation

copy

Full Screen

1import "fmt"2func main() {3    fmt.Println("Hello, world.")4    reporters_test := new(Reporters_test)5    reporters_test.CLS()6}7import "fmt"8func main() {9    fmt.Println("Hello, world.")10    reporters_test := new(Reporters_test)11    reporters_test.CLS()12}13import "fmt"14func main() {15    fmt.Println("Hello, world.")16    reporters_test := new(Reporters_test)17    reporters_test.CLS()18}19import "fmt"20func main() {21    fmt.Println("Hello, world.")22    reporters_test := new(Reporters_test)23    reporters_test.CLS()24}25import "fmt"26func main() {27    fmt.Println("Hello, world.")28    reporters_test := new(Reporters_test)29    reporters_test.CLS()30}31import "fmt"32func main() {33    fmt.Println("Hello, world.")34    reporters_test := new(Reporters_test)35    reporters_test.CLS()36}37import "fmt"38func main() {39    fmt.Println("Hello, world.")40    reporters_test := new(Reporters_test)41    reporters_test.CLS()42}43import "fmt"44func main() {45    fmt.Println("Hello, world.")46    reporters_test := new(Reporters_test)47    reporters_test.CLS()48}49import "fmt"50func main() {51    fmt.Println("Hello, world.")52    reporters_test := new(Reporters_test)53    reporters_test.CLS()54}

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Ginkgo automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful