From 6a66801d52f3dca5e2a89e2873ca12ea106fd156 Mon Sep 17 00:00:00 2001 From: Martin Rode Date: Mon, 19 Jul 2021 15:39:15 +0200 Subject: [PATCH] Fix failure counts for tests with subtest where the top level fails to render the template see #61772 --- pkg/lib/report/report.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/lib/report/report.go b/pkg/lib/report/report.go index 4a2b081..149720e 100755 --- a/pkg/lib/report/report.go +++ b/pkg/lib/report/report.go @@ -118,10 +118,11 @@ func (r *ReportElement) Leave(result bool) { if len(r.SubTests) == 0 { r.TestCount++ - if !result { - r.Failures++ - } } + if !result { + r.Failures++ + } + r.ExecutionTime = time.Since(r.StartTime) }