From 8611d1d64425a8251b80a088a88034639034f605 Mon Sep 17 00:00:00 2001 From: Rolf Madsen Date: Wed, 5 Nov 2025 12:51:03 +0100 Subject: [PATCH] Added publishing artifacts from CsvPythonResultListener example --- OpenTap.Python.Examples/CsvResultListener.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OpenTap.Python.Examples/CsvResultListener.py b/OpenTap.Python.Examples/CsvResultListener.py index e5bc556..dd02c6c 100644 --- a/OpenTap.Python.Examples/CsvResultListener.py +++ b/OpenTap.Python.Examples/CsvResultListener.py @@ -63,6 +63,11 @@ def OnTestPlanRunCompleted(self, planRun, logStream): # Then write to the file. System.IO.File.WriteAllText(fileName, self.sb.ToString()) + + # Publish the csv file as an artifact. This feature is a available from OpenTAP 9.22.0 + if hasattr(planRun, "PublishArtifact"): + planRun.PublishArtifact(fileName) + except Exception as e: self.log.Debug(e)