diff --git a/process_teststep.go b/process_teststep.go index 4b4587ab..ba4c7d41 100644 --- a/process_teststep.go +++ b/process_teststep.go @@ -121,12 +121,6 @@ func (v *Venom) RunTestStep(ctx context.Context, e ExecutorRunner, tc *TestCase, stepName = fmt.Sprintf("step_%d_%d", stepNumber, rangedIndex) } v.metricsCollector.RecordTestCheck(stepName, assertRes.OK) - - // Record individual assertion results - for i, assertion := range assertRes.Assertions { - checkName := fmt.Sprintf("%s_assertion_%d", stepName, i) - v.metricsCollector.RecordTestCheck(checkName, assertion.IsOK) - } } if !assertRes.OK && len(assertRes.errors) > 0 { diff --git a/reporting/metrics_html.go b/reporting/metrics_html.go index 1ad8a256..19e755f7 100644 --- a/reporting/metrics_html.go +++ b/reporting/metrics_html.go @@ -6,6 +6,7 @@ import ( "fmt" "html/template" "os" + "time" "github.com/ovh/venom/reporting/aggregator" ) @@ -54,9 +55,11 @@ func GenerateMetricsHTMLReportWithThresholds(metrics *aggregator.Metrics, output data := struct { MetricsJSON template.JS ThresholdsJSON template.JS + GenerationTime string }{ MetricsJSON: template.JS(metricsJSON), ThresholdsJSON: template.JS(thresholdsJSON), + GenerationTime: time.Now().UTC().Format(time.RFC3339), } err = tmpl.Execute(file, data) diff --git a/reporting/metrics_html_template.html b/reporting/metrics_html_template.html index 1a94a725..0f14094f 100644 --- a/reporting/metrics_html_template.html +++ b/reporting/metrics_html_template.html @@ -1800,6 +1800,7 @@

// Global variables let metricsData = {{.MetricsJSON }}; let thresholds = {{.ThresholdsJSON }}; + let generationTime = "{{.GenerationTime}}"; // Utility functions function debounce(func, wait) { @@ -1865,8 +1866,20 @@

}); function initializeReport() { - // Set generation time - document.getElementById('generation-time').textContent = new Date().toLocaleString(); + // Set generation time in UTC + const utcTime = new Date(generationTime).toLocaleString('en-US', { + timeZone: 'UTC', + year: 'numeric', + month: '2-digit', + day: '2-digit', + hour: '2-digit', + minute: '2-digit', + second: '2-digit', + hour12: false + }); + + // Display UTC time + document.getElementById('generation-time').textContent = `${utcTime} UTC`; // Load thresholds loadThresholds();