Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExtentReport path fix in s3 #484

Merged
merged 1 commit into from
Oct 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,18 @@ public void beforeSuite() {
this.properties = Utils.getProperties(TestRunner.getExternalResourcePath() + "/config/config.properties");
Utils.setupLogger(System.getProperty("user.dir") + "/" + System.getProperty("testng.outpur.dir") + "/"
+ this.properties.getProperty("ivv._path.auditlog"));


String emailableReportName=System.getProperty("user.dir") + "/" + System.getProperty("testng.outpur.dir") + "/"
+ this.properties.getProperty("ivv._path.reports")+BaseTestCase.generateRandomAlphaNumericString(7)+".html";

String emailableReportName=null;
if (TestRunner.checkRunType().equalsIgnoreCase("IDE")) {
emailableReportName=System.getProperty("user.dir") + "/" + System.getProperty("testng.outpur.dir") + "/"
+ this.properties.getProperty("ivv._path.reports")+BaseTestCase.generateRandomAlphaNumericString(7)+".html";
logger.info("Extent Report path :" +emailableReportName);
} else if (TestRunner.checkRunType().equalsIgnoreCase("JAR")) {
emailableReportName=System.getProperty("user.dir") + "/"
+ this.properties.getProperty("ivv._path.reports")+BaseTestCase.generateRandomAlphaNumericString(7)+".html";
logger.info("Extent Report path :" +emailableReportName);
}


BaseTestCaseUtil.setExtentReportName(emailableReportName);

htmlReporter = new ExtentHtmlReporter(BaseTestCaseUtil.getExtentReportName());
Expand Down Expand Up @@ -345,7 +352,9 @@ private void run(int i, Scenario scenario, HashMap<String, String> configs, Hash
extentTest.skip("A-" + scenario.getId() + ": Skipping scenario due to known Automation issue");
updateRunStatistics(scenario);
throw new SkipException("A-" + scenario.getId() + ": Skipping scenario due to known Automation issue");

}

extentTest.info(identifier + " - running"); //
extentTest.info("parameters: " + step.getParameters().toString());
StepInterface st = getInstanceOf(step);
Expand Down Expand Up @@ -429,6 +438,7 @@ private void run(int i, Scenario scenario, HashMap<String, String> configs, Hash
extentTest.error(identifier + " - RuntimeException --> " + e.toString());
logger.warn(e.getMessage());
Reporter.log(e.getMessage());
Assert.assertTrue(false);

}

Expand Down
Loading