extentreports-cucumber4-adapter
extentreports-cucumber4-adapter copied to clipboard
How to attach log files to top of extent reports
I want to attach my log files to my extent reports. I saw the following from @anshooarora, but it does not solve my issue completely
https://github.com/anshooarora/extentreports-java/issues/249
The problem is that the log gets attached to the last testcase that ran, since I put the command to attach log on my Extent Listener in onExecutionFinish() method:
@Override
public void onExecutionFinish() {
ExtentLogger.logInfo("<a href='file:///C:/Users/skhandekar/eclipse-workspace/Nalu.CP.Automation/nalu-med-mob-app/Outputs/Execution Logs/ExecutionLog.log'>Execution Logs</a>");
ExtentManager.getInstance().flush();
}
I want my log to instead be attached on top of the reports as shown in the image below:
Any idea how this can be achieved? Thanks in advance!
With this I was able to attach the execution log to the Log view of the Extent reports, but I want it to be on the main page where all the test results are displayed:
String path = "<a href='file:///C:/Users/abc/eclipse-workspace/CP.Automation/med-mob-app/Outputs/Execution Logs/ExecutionLog.log'>Execution Logs</a>";
extent.addTestRunnerOutput(path);
How can i put this in the desired location?