Exemple #1
0
func buildReporter() reporting.Reporter {
	switch {
	case testReporter != nil:
		return testReporter
	case json:
		return reporting.BuildJsonReporter()
	case silent:
		return reporting.BuildSilentReporter()
	case story:
		return reporting.BuildStoryReporter()
	default:
		return reporting.BuildDotReporter()
	}
}
Exemple #2
0
func buildReporter() reporting.Reporter {
	if testReporter != nil {
		return testReporter

	} else if flagFound(jsonEnabled) {
		return reporting.BuildJsonReporter()

	} else if flagFound(silentEnabled) {
		return reporting.BuildSilentReporter()

	} else if flagFound(verboseEnabled) || flagFound(storyEnabled) {
		return reporting.BuildStoryReporter()

	} else {
		return reporting.BuildDotReporter()

	}
}
Exemple #3
0
func buildReporter() reporting.Reporter {
	selectReporter := os.Getenv("GOCONVEY_REPORTER")

	switch {
	case testReporter != nil:
		return testReporter
	case json || selectReporter == "json":
		return reporting.BuildJsonReporter()
	case silent || selectReporter == "silent":
		return reporting.BuildSilentReporter()
	case selectReporter == "dot":
		// Story is turned on when verbose is set, so we need to check for dot reporter first.
		return reporting.BuildDotReporter()
	case story || selectReporter == "story":
		return reporting.BuildStoryReporter()
	default:
		return reporting.BuildDotReporter()
	}
}