Exemplo n.º 1
0
func buildDefaultReporter() Reporter {
	remoteReportingServer := config.GinkgoConfig.StreamHost
	if remoteReportingServer == "" {
		stenographer := stenographer.New(!config.DefaultReporterConfig.NoColor)
		return reporters.NewDefaultReporter(config.DefaultReporterConfig, stenographer)
	} else {
		return remote.NewForwardingReporter(remoteReportingServer, &http.Client{}, remote.NewOutputInterceptor())
	}
}
Exemplo n.º 2
0
func buildDefaultReporter() Reporter {
	remoteReportingServer := os.Getenv("GINKGO_REMOTE_REPORTING_SERVER")
	if remoteReportingServer == "" {
		stenographer := stenographer.New(!config.DefaultReporterConfig.NoColor)
		return reporters.NewDefaultReporter(config.DefaultReporterConfig, stenographer)
	} else {
		return remote.NewForwardingReporter(remoteReportingServer, &http.Client{}, remote.NewOutputInterceptor())
	}
}
Exemplo n.º 3
0
		ginkgoConfig config.GinkgoConfigType
		suite        *types.SuiteSummary
		spec         *types.SpecSummary
	)

	BeforeEach(func() {
		stenographer = st.NewFakeStenographer()
		reporterConfig = config.DefaultReporterConfigType{
			NoColor:           false,
			SlowSpecThreshold: 0.1,
			NoisyPendings:     true,
			Verbose:           true,
			FullTrace:         true,
		}

		reporter = reporters.NewDefaultReporter(reporterConfig, stenographer)
	})

	call := func(method string, args ...interface{}) st.FakeStenographerCall {
		return st.NewFakeStenographerCall(method, args...)
	}

	Describe("SpecSuiteWillBegin", func() {
		BeforeEach(func() {
			suite = &types.SuiteSummary{
				SuiteDescription:           "A Sweet Suite",
				NumberOfTotalSpecs:         10,
				NumberOfSpecsThatWillBeRun: 8,
			}

			ginkgoConfig = config.GinkgoConfigType{
Exemplo n.º 4
0
func RunSpecsWithDefaultAndCustomReporters(t *testing.T, description string, specReporters []Reporter) {
	specReporters = append([]Reporter{reporters.NewDefaultReporter(config.DefaultReporterConfig)}, specReporters...)
	globalSuite.run(t, description, specReporters, config.GinkgoConfig)
}
Exemplo n.º 5
0
func RunSpecs(t *testing.T, description string) {
	globalSuite.run(t, description, []Reporter{reporters.NewDefaultReporter(config.DefaultReporterConfig)}, config.GinkgoConfig)
}