extentreports-java icon indicating copy to clipboard operation
extentreports-java copied to clipboard

Spark - Generated Logs not displayed for child nodes.

Open grasshopper7 opened this issue 3 years ago • 2 comments

extent.createTest("Child Test generate log missing").generateLog(Status.INFO, "Parent Generated Log").log(Status.INFO, "Parent Normal Log").createNode("child").generateLog(Status.INFO, "Child Generated Log").log(Status.INFO, "Child Normal Log");

log

The generated log for the child node is missing.

grasshopper7 avatar Dec 10 '21 07:12 grasshopper7

Adding code from standard-content.ftl to recurse_nodes.ftl below following line https://github.com/extent-framework/extentreports-java/blob/34120248af771356aad55ea359febae131bfa128/src/main/resources/com/aventstack/extentreports/templates/spark/macros/recurse_nodes.ftl#L24

<#list node.generatedLog as l>
    <div>
	  <div class="float-left"><span class="badge log ${l.status.toLower()}-bg">${l.status?string}</span></div>
	  <div class="float-right" style="width:95%;">${l.details}</div>
   </div> 
</#list>

Maybe a separate ftl file with the generated log display logic would help.

logfix

grasshopper7 avatar Dec 10 '21 11:12 grasshopper7

Has this issue been fixed? I am facing the same issue.

skhandekar1 avatar Dec 20 '21 21:12 skhandekar1