We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In json file, if test doesn't have media base64 Report1.json
the merged report looks good
but if any step contains media base64, the merged report will be missing step name in html file Report1.json
This is my code for merging report ` File file = new File("ExtentJson"); if (!file.exists()) { file.mkdir(); } String opFolder = file.getPath();
String path = "\\src\\test\\java\\com\\"; String jsonPath = path + "JsonPath\\"; //Creating individual Report Number 1 ExtentSparkReporter spark = new ExtentSparkReporter(path + "Report1.html"); JsonFormatter json = new JsonFormatter(jsonPath + "Report1.json"); ExtentReports extent = new ExtentReports(); extent.createTest("test1").assignCategory("cat").pass("Step 1 from test 1") .pass("step 2 from test 1"); extent.attachReporter(json, spark); extent.flush(); //Creating individual Report Number 2 ExtentSparkReporter spark2 = new ExtentSparkReporter(path + "Report2.html"); JsonFormatter json2 = new JsonFormatter(jsonPath + "Report2.json"); ExtentReports extent2 = new ExtentReports(); extent2.createTest("test2").assignCategory("cat").pass("Step 1 from test 2") .fail("step 2 from test 2"); extent2.attachReporter(json2, spark2); extent2.flush(); ExtentSparkReporter mergedSpark = new ExtentSparkReporter(path + "spark.html"); ExtentReports extentMerged = new ExtentReports(); //Replace below logic to get all the .json files generated by extent in opFolder File jsonOPDirectory = new File(jsonPath); if (jsonOPDirectory.exists()) { Arrays.stream(jsonOPDirectory.listFiles()).forEach(jsonFile -> { try { extentMerged.createDomainFromJsonArchive(jsonFile.getPath()); } catch (IOException e) { e.printStackTrace(); } }); } extentMerged.attachReporter(mergedSpark); extentMerged.flush();`
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In json file, if test doesn't have media base64
Report1.json
the merged report looks good
but if any step contains media base64, the merged report will be missing step name in html file
Report1.json
This is my code for merging report
` File file = new File("ExtentJson");
if (!file.exists()) {
file.mkdir();
}
String opFolder = file.getPath();
The text was updated successfully, but these errors were encountered: