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

Timestamp for previous tests got updated incorrectly on using json formatter #341

Open
Udjain opened this issue Dec 28, 2021 · 1 comment

Comments

@Udjain
Copy link

Udjain commented Dec 28, 2021

Not sure if I am missing something or its a bug but when you run your 2nd test which try to append to the existing report using json formatter the timestamp including start/end time got updated for the previous test & remain same.

using below code:

sparkReporter = new ExtentSparkReporter(reportPath + "//TestReport.html");
extent = new ExtentReports();
json = new JsonFormatter(reportPath + "//TestReport.json");
try {
extent.createDomainFromJsonArchive(reportPath + "//TestReport.json");
} catch (IOException e) {
e.printStackTrace();
}
extent.attachReporter(json, sparkReporter);
extent.attachReporter(sparkReporter);
extent.setReportUsesManualConfiguration(true);

image

image

@fatcatpl-sub
Copy link

Hi, I think I got that same issue in 5.1.0 (jdk 11) & 5.1.1 (jdk 17). First test run generates an html file with correct timestamps, but after running the test again, the first run's timestamps get overwritten to one identical timestamp matching the moment createDomainFromJsonArchive is run (based on some quick debugging). The second run's timestamps are saved correctly. Then, after running the test for the 3rd time, the 2nd run's timestamps got overwritten, while the 3rd run timestamps were displayed correctly. Let me know if any additional info (test report, json) would be helpful to reproduce/fix the issue. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants