Reputation: 21
enter image description hereExtentSparkReporter htmlReporterSuite = createHtmlReporter(randomFilePath);
extent = new ExtentReports();
extent.attachReporter(htmlReporterSuite);
ExtentTest parentNode = extent.createTest("ParentNode");
ExtentTest childNodeOne = parentNode.createNode("ChildNodeOne");
childNodeOne.pass("New passs");
childNodeOne.getModel().setStartTime(new Date(1732256983094L));
childNodeOne.getModel().setEndTime(new Date(1732256992702L));
childNodeOne.info("Manually Start - " + new Date(1732256983094L) + ", End - " + new Date(1732256992702L));
childNodeOne.info("Getted Start - " + childNodeOne.getModel().getStartTime() + ", End - " + childNodeOne.getModel().getEndTime());
WaitTime(10);
ExtentTest childNodeTwo = parentNode.createNode("ChildNodeTwo");
childNodeTwo.pass("New passs");
childNodeTwo.getModel().setStartTime(new Date(1732257143285L));
childNodeTwo.getModel().setEndTime(new Date(1732257456500L));
childNodeTwo.info("Manually Start - " + new Date(1732257143285L) + ", End - " + new Date(1732257456500L));
childNodeTwo.info("Getted Start - " + childNodeTwo.getModel().getStartTime() + ", End - " + childNodeTwo.getModel().getEndTime());
extent.flush();
This is my code and output is
ExtentReport version - 5.1.2
How to set the customised end time for child node.
Upvotes: 2
Views: 16