From 6a0267d4e9b33b10a314f1e42d2ab7d271a9b6de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wenkai=20Yin=28=E5=B0=B9=E6=96=87=E5=BC=80=29?= Date: Mon, 26 Jul 2021 09:49:42 +0800 Subject: [PATCH] Generate test report for the E2E testing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Generate test report for the E2E testing so that we can check the test result in the automation pipelines easily Signed-off-by: Wenkai Yin(尹文开) --- test/e2e/e2e_suite_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/e2e/e2e_suite_test.go b/test/e2e/e2e_suite_test.go index 0429070ec..05f787310 100644 --- a/test/e2e/e2e_suite_test.go +++ b/test/e2e/e2e_suite_test.go @@ -21,6 +21,7 @@ import ( "testing" . "github.com/onsi/ginkgo" + "github.com/onsi/ginkgo/reporters" . "github.com/onsi/gomega" ) @@ -60,5 +61,6 @@ func TestE2e(t *testing.T) { } RegisterFailHandler(Fail) - RunSpecs(t, "E2e Suite") + junitReporter := reporters.NewJUnitReporter("report.xml") + RunSpecsWithDefaultAndCustomReporters(t, "E2e Suite", []Reporter{junitReporter}) }