Every time you generate a Cucumber report, it gets generated in the same folder and overwrites the existing report. You can customize the report folder name with date and time details to avoid this.
For that, add the following two lines in your extent properties file.
Here base folder is where spark, pdf reports and screenshots will be stored. Date pattern will be added after the base folder name.
Make sure that date patten is valid date-time format. You can check all the different Formatter patterns here (Oracle Class DateFormatter).
extent.properties with other report configuration
extent.reporter.spark.start=true extent.reporter.spark.out=SparkReport/MySparkReport.html screenshot.dir=screenshots screenshot.rel.path=../screenshots/ extent.reporter.pdf.start=true extent.reporter.pdf.out=PDFReport/ExtentReport.pdf basefolder.name=test-output/reports basefolder.datetimepattern=d-MMM-YY-HH-mm-ss
Output folder after execution of report
In above screenshot you can see our base folder was test-output/reports , date time and seconds are postfixed after report folder name. PDF Report and Spark report and screenshots folders are created inside report folder.