diff --git a/conformance/00_conformance_suite_test.go b/conformance/00_conformance_suite_test.go index f20d68d5..70230776 100644 --- a/conformance/00_conformance_suite_test.go +++ b/conformance/00_conformance_suite_test.go @@ -5,6 +5,7 @@ import ( "testing" g "github.com/onsi/ginkgo/v2" + "github.com/onsi/ginkgo/v2/reporters" . "github.com/onsi/gomega" ) @@ -18,7 +19,6 @@ func TestConformance(t *testing.T) { RegisterFailHandler(g.Fail) suiteConfig, reporterConfig := g.GinkgoConfiguration() - reporterConfig.JUnitReport = reportJUnitFilename hr := newHTMLReporter(reportHTMLFilename) g.ReportAfterEach(hr.afterReport) g.ReportAfterSuite("html custom reporter", func(r g.Report) { @@ -26,5 +26,12 @@ func TestConformance(t *testing.T) { log.Printf("\nWARNING: cannot write HTML summary report: %v", err) } }) + g.ReportAfterSuite("junit custom reporter", func(r g.Report) { + if reportJUnitFilename != "" { + _ = reporters.GenerateJUnitReportWithConfig(r, reportJUnitFilename, reporters.JunitReportConfig{ + OmitLeafNodeType: true, + }) + } + }) g.RunSpecs(t, "conformance tests", suiteConfig, reporterConfig) }