Closed MininAS closed 3 years ago
@MininAS Relative Baseline path is supported. From the error log it looks like the failure occurs where it expects the output directory to exist. A condition above the assert statement checks for the existence of baseline folder. Seems like that's working fine. Is your baseline folder within the output folder? And are you passing absolute path to the output directory?
Yep, baseline folder ${OUTPUT_DIR}${/}visual_images_original
is in output folder.
As far as the OUTPUT_DIR framework variable contains result output folder.
And are you passing absolute path to the output directory? Yep. In this case OUTPUT_DIR = d:\robot-test-asset
@MininAS Is this a separate location from where your tests are running?
the same
report_generation.py =>
import os
import xml.etree.ElementTree as ET
from time import sleep
from .constants import IMAGE_EXTENSIONS
def generate_report(baseline_folder, results_folder, actual_folder=None):
sleep(1)
img_path = os.path.join(results_folder, 'visual_images')
report_path = os.path.join(results_folder, 'output.xml')
relative_baseline_folder_path = relative_path(baseline_folder, results_folder.replace(os.getcwd(), ''))
relative_actual_folder_path = relative_path(actual_folder, results_folder.replace(os.getcwd(), '')) if actual_folder else ''
baseline_folder = "visual_images_original"
results_folder = "D:\robot-test-asset"
so =>
results_folder.replace(os.getcwd(), '')
returns an empty because os.getcwd()
= "D:\robot-test-asset"
then relative_path
method gets the empty the second attribute and go to exception
@MininAS Understood. The code is breaking when results are stored in the root itself. I'll fix this
Thank you!!! I'm looking forward to it. :)
Hi @MininAS, I have pushed a fix in v1.5.7. Can you please upgrade and check if your issue gets resolved?
Big thanks!!! Works good locally and in automation Jenkins too.
Hello @MininAS
Could you please share the command to start your test?
so I had facing issue error >> 'please provide image baseline directory'
My command is >> robot -d regression -v image_dir:out1 .\robot-test..
Hi! Your varible name is image_dir and should be images_dir.
Describe the bug What can we set like path for baseline image directory? Should it be full or relative path? With full path a test finishes correctly.
Console output =>
But if we pointed relative path
Console output =>
It is not blocker for testing localy, but it seems it affects to visual report at Jenkins automation server. We need to publish visual report results to artifactory and report contains broken link to base line image. An actual and diff links are correct. I assume that this is related that we set the baseline image directory path like full.