From be98235b2e2f18129c417416eed8bac55de7ab67 Mon Sep 17 00:00:00 2001 From: anuradha24 <32838093+anuradha24@users.noreply.github.com> Date: Sun, 22 Mar 2020 02:01:35 +0530 Subject: [PATCH] Changed fileName in RemoteLogDashboard uploafFile object to use testFileNameTemplate (#1149) Description : Fix for issue - https://github.com/zalando/zalenium/issues/1148 testFileNameTemplate is needed for the log files sent to Remote Dashboard to be able to associate them with a given test case Co-authored-by: Anuradha Konduri --- .../de/zalando/ep/zalenium/dashboard/TestInformation.java | 4 ++++ .../ep/zalenium/dashboard/remote/RemoteLogDashboard.java | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/zalando/ep/zalenium/dashboard/TestInformation.java b/src/main/java/de/zalando/ep/zalenium/dashboard/TestInformation.java index 0d7ceee00f..c8ccc8f0e1 100644 --- a/src/main/java/de/zalando/ep/zalenium/dashboard/TestInformation.java +++ b/src/main/java/de/zalando/ep/zalenium/dashboard/TestInformation.java @@ -61,6 +61,10 @@ public void setVideoRecorded(boolean videoRecorded) { this.videoRecorded = videoRecorded; } + public String getTestNameNoExtension() { + return testNameNoExtension; + } + public String getVideoFolderPath() { return videoFolderPath; } diff --git a/src/main/java/de/zalando/ep/zalenium/dashboard/remote/RemoteLogDashboard.java b/src/main/java/de/zalando/ep/zalenium/dashboard/remote/RemoteLogDashboard.java index 5f6f1d9818..ea47619d00 100644 --- a/src/main/java/de/zalando/ep/zalenium/dashboard/remote/RemoteLogDashboard.java +++ b/src/main/java/de/zalando/ep/zalenium/dashboard/remote/RemoteLogDashboard.java @@ -38,7 +38,7 @@ public void updateDashboard(TestInformation testInformation) throws Exception { uploadFile.stream = new FileInputStream(Paths.get(testInformation.getVideoFolderPath(), testInformation.getSeleniumLogFileName()).toString()); } - uploadFile.fileName = testInformation.getBrowserDriverLogFileName(); + uploadFile.fileName = testInformation.getTestNameNoExtension()+".log"; fields.add(uploadFile); this.setupMetadata(testInformation).addProperty("Type", "logfile");