@@ -99,7 +99,9 @@ public void generateExtentReport() {
9999 thisReport .getResults ().forEach (thisScenario -> {
100100 ExtentTest test = extentReports .createTest (thisScenario .getScenarioName ());
101101
102- // Add meta information to the test
102+ /**This code checks if the scenario has meta data.
103+ If it does, it iterates through each meta data entry and adds it to
104+ the Extent report as an info label.**/
103105 if (thisScenario .getMeta () != null ) {
104106 for (Map .Entry <String , List <String >> entry : thisScenario .getMeta ().entrySet ()) {
105107 String key = entry .getKey ();
@@ -286,6 +288,7 @@ public void generateCsvReport(List<ZeroCodeCsvReport> zeroCodeCsvReportRows) {
286288 .addColumn ("responseTimeStamp" )
287289 .addColumn ("result" )
288290 .addColumn ("method" )
291+ // This adds new columns to the CSV schema for each type of meta data.
289292 .addColumn ("metaAuthors" )
290293 .addColumn ("metaTickets" )
291294 .addColumn ("metaCategories" )
@@ -327,6 +330,9 @@ public List<ZeroCodeCsvReport> buildCsvRows() {
327330 // Add meta information
328331 Map <String , List <String >> meta = thisResult .getMeta ();
329332 if (meta != null ) {
333+ /**This code retrieves the meta data from the test result. If meta data exists,
334+ * it joins the list of values for each meta data type into a comma-separated
335+ * string and adds it to the CSV row.**/
330336 csvFileBuilder .metaAuthors (String .join (", " , meta .getOrDefault ("authors" , Collections .emptyList ())));
331337 csvFileBuilder .metaTickets (String .join (", " , meta .getOrDefault ("tickets" , Collections .emptyList ())));
332338 csvFileBuilder .metaCategories (String .join (", " , meta .getOrDefault ("categories" , Collections .emptyList ())));
0 commit comments