extentreports-cucumber4-adapter
extentreports-cucumber4-adapter copied to clipboard
Folder path mentioned in extent config.properties file (screenshot.dir field) is not getting created
Hi.. Please help on the issue below
I am working on the BDD project from the secured shared automation server and I have used extentreports-cucumber6-adapter for reporting.
The user.dir of my project is like \Sharefolder1\folder2\folder3_Selenium_Team_Workspace\Sudha_Automation\BDD\Aug23\UpgradedAutomation
I have added extent.properties as below: extent.reporter.html.out=test-results/HTML/TRS_Report.html extent.reporter.spark.out=test-results/SparkReport/TRS_AutomationReport.html extent.reporter.pdf.out=test-results/pdfReport/TRS_AutomationReport.pdf screenshot.dir=test-results/ screenshot.rel.path=../
OBSERVATIONS:
- Reports are getting generated as expected under \Sharefolder1\folder2\folder3_Selenium_Team_Workspace\Sudha_Automation\BDD\Aug23\UpgradedAutomation\test-results However, I am facing issue in adding screenshots in the mentioned folder.
- I am expecting the screenshots should be available under \Sharefolder1\folder2\folder3_Selenium_Team_Workspace\Sudha_Automation\BDD\Aug23\UpgradedAutomation\test-results But, I am getting the errors saying Error 1: For the first test case: Embedding Screenshot [image/png 45025 bytes] io.cucumber.core.exception.CucumberException: java.io.FileNotFoundException: \folder2\folder3_Selenium_Team_Workspace\Sudha_Automation\BDD\Aug23\UpgradedAutomation\test-results\embedded1.png (The system cannot find the path specified) NOTE: Sharefolder1 is missing from the path Error 2: For the second test case: Embedding Screenshot [image/png 45025 bytes] io.cucumber.core.exception.CucumberException: java.io.IOException: Failed to create directory \Sharefolder1\folder2\folder3_Selenium_Team_Workspace\Sudha_Automation\BDD\Aug23\UpgradedAutomation*folder2\folder3_Selenium_Team_Workspace\Sudha_Automation\BDD\Aug23\UpgradedAutomation*\test-results NOTE: Duplicates in the path Once I refresh the project, I can see folder created 'folder2\folder3_Selenium_Team_Workspace\Sudha_Automation\BDD\Aug23\UpgradedAutomation**\test-results' under project and no screenshot is there.
Please let me know which path will be considered in extent.properties screenshot.dir field. Is it user.dir+folder? Also let me know is there any other solution for this issue.
Thanks and Regards, Sudha