NEW Posts – Generating Spark and Pdf Extent Report for “Rest Assured with Maven plugin” and “Rest Assured and Cucumber with Maven plugin”
Article has been modified with new features and changes
Introduction
This article describes the different methods of report generation, sections and settings of the Cucumber PDF report. The report contains of six sections – dashboard, summary, tags, features, scenarios and detailed sections. A sample report can be found here.
The PDF report can be created by using a Maven plugin in the post-integration-test phase, which is explained below. The Cucumber Json report is used as a data source.
This report can also be generated as part of the ExtentReport reporters suite. More details for creating PDF ExtentReport using a Cucumber-JVM 7 adapter can be found here, for a Cucumber-JVM 6 adapter can be found here and for a Cucumber-JVM 5 adapter can be found here. To create PDF ExtentReport using a Maven plugin, which uses the Cucumber Json report and runs in the post-integration-test phase, refer to this article.
Source Code
The source code for the report can be found here. The source code for the maven report plugin can be found here. A sample implementation is located here.
Report created by Maven Plugin
The PDF report can be generated by using a maven plugin which is executed in the post-integration-test phase.
The JSON report needs to be generated first which can be done by setting up the below setting on the Cucumber runner. The report folder and the name of the report can be customized as desired.
@CucumberOptions(plugin = { "json:target/json-report/cucumber.json"})
The below configuration needs to be added to the project pom to setup the PDF report plugin. The cucumberJsonReportDirectory configuration is mandatory which is the location of the generated Cucumber Json files. This will generate the PDF report with the default settings.
<plugin>
<groupId>tech.grasshopper</groupId>
<artifactId>cucumber-pdf-plugin</artifactId>
<version>1.13.0</version>
<executions>
<execution>
<id>report</id>
<phase>post-integration-test</phase>
<goals>
<goal>pdfreport</goal>
</goals>
</execution>
</executions>
<configuration>
<cucumberJsonReportDirectory>${project.build.directory}/json-report</cucumberJsonReportDirectory>
</configuration>
</plugin>
Below are plugin configurations related to report generation along with default values.
Configuration | Description | Default |
cucumberJsonReportDirectory | Directory location of cucumber json reports. Mandatory. | |
cucumberPdfReportDirectory | Directory prefix of location of generated pdf report | report |
cucumberPdfReportDirectoryTimeStamp | Directory suffix of location of generated pdf report | dd MM yyyy HH mm ss |
strictCucumber6Behavior | Cucumber 6 Strict behavior | true |
There are two ways of modifying the report look and feel. One way is to add a yaml properties file named pdf-config.yaml in the src/test/resources folder. Another way is to add a subset of available settings in the Maven plugin configurations.
Report created with ExtentReport
The PDF report can be generated with the ExtentReport suite by using the Extent Cucumber Adapter. The report has to be enabled in the extent.properties file (version 5 & 6 & 7). More details for setting up PDF ExtentReport using a Cucumber-JVM 7 adapter can be found here, for a Cucumber-JVM 6 adapter can be found here and for a Cucumber-JVM 5 adapter can be found here.
extent.reporter.pdf.start=true
extent.reporter.pdf.out=test output/PdfReport/ExtentPdf.pdf
The ExtentReport suite can also be generated by using Maven plugin which executes in the post-integration-test phase. This uses the Cucumber Json report as the data source. This creates the report with default settings. For a detailed explanation to set this up, refer to this article.
In both the cases, the report will be generated with default settings. The report look and feel can be modified by adding a yaml properties file named pdf-config.yaml in the src/test/resources folder.
Report Sections
The report contains of six sections – dashboard, summary, tags, features, scenarios and detailed sections.
- Dashboard – This section is a single page dashboard which summarizes the test run. This contains the report title, duration and status breakups.
- Summary section – This section provides an overview of the test run in terms of a feature breakdown, comprising of duration, scenario count and step count.
- Tag section – This section provides an overview of the test run in terms of a tag breakdown, comprising of feature count and scenario count.
- Feature section – This section describes the feature details with a stacked bar chart and a table of the scenario status and duration. This section display can be controlled by a configuration setting, enabled by default.
- Scenario section – This section describes the scenario details with a stacked bar chart and a table of the step status and duration. This section display can be controlled by a configuration setting, enabled by default.
- Detailed section – This section describes the details of individual steps and hooks along with status and duration. This section display can be controlled by a configuration setting, enabled by default.
Report Settings via YAML file
The report settings can be used to toggle on and off optional report sections, change report title, text color for various data, background color and other options.
The settings are stored in a YAML file with the name pdf-config.yaml, located in the src/test/resources folder of the project. If the file is not present or any settings are not set, the default values are used. To change the default values, add a pdf-config.yaml file in the src/test/resources folder of the project with only the settings with new values. A sample YAML configuration file can be found here.
This method of configuring report settings using a yaml properties file can be used both for the Maven plugin report generation as well as the ExtentReport style.
The passed, failed and skipped colors can be set with the passColor, failColor and skipColor properties. These take in the colors in hex values (without the leading ‘#’) and are valid throughout the report.
The features, scenarios, tags and detailed sections can be displayed by setting the displayFeature, displayScenario, displayTag and displayDetailed properties to true. The default value for these settings is true.
Screenshots are displayed as thumbnail and can be opened in available native application. This is the default behavior, in which the screenshot file is embedded in the pdf file. This can be toggled by the displayAttached setting. When the setting is set to false, only the thumbnail is displayed. These can also be displayed in zoomed images in a separate section by setting the displayExpanded to true and also displayAttached to false.
Dashboard
This section is a single page dashboard which summarizes the test run. This contains the report title, duration, status breakups and pass percentages. The properties inside dashboardConfig (renamed from earlier summaryConfig) key is used to configure the display in the yaml properties file.
Element | Property |
title, title color, date color | title, titleColor, dateColor |
start time, end time, duration color | timeColor |
status data background color | dataBackgroundColor |
dial chart ‘bad range’ or the ‘red zone’, ‘average range’ or ‘yellow zone’, ‘good range’ or ‘green zone’ color | dial.badColor, dial.averageColor, dial.goodColor |
dial chart feature ranges, scenario ranges, step ranges color | dial.featureRanges, dial.scenarioRanges, dial.stepRanges |
Summary Section
This section provides an overview of the test run in terms of a feature breakdown, comprising of duration, scenario count and step count. The scenarios and steps are divided into status counts. The feature name has a link which navigates to further details in the detailed step section. This link is only present if the detailed section is enabled. The properties inside the summaryConfig key is used to configure the display in the yaml properties file.
Element | Property |
feature duration color | durationColor |
total scenario and step count color | totalColor |
Tag Section
This section provides an overview of the test run in terms of a tag breakdown, comprising of feature count and scenario count. The scenarios and features are divided into status counts. The properties inside tagConfig key is used to configure the display in the yaml properties file.
Element | Property |
total feature and scenario count color | totalColor |
Feature Section
This section describes the feature details with a stacked bar chart and a table of the scenario status and duration. This section display can be controlled by toggling the displayFeature property. The feature name has a link which navigates to further details in the detailed step section. This link is only present if the detailed section is enabled. The properties inside the featureConfig key is used to configure the display in the yaml properties file.
Element | Property |
total scenario count color | totalColor |
duration color | durationColor |
Scenario Section
This section describes the scenario details with a stacked bar chart and a table of the step status and duration. This section display can be controlled by toggling the displayScenario property. The feature and scenario names have a link which navigates to further details in the detailed step section. This link is only present if the detailed section is enabled. The properties inside the scenarioConfig key is used to configure the display in the yaml properties file.
Element | Property |
total step count color | totalColor |
duration color | durationColor |
Detailed Section
This section describes the details of individual steps and hooks along with status and duration. This section display can be controlled by toggling the displayDetailed property.
The properties inside the detailedFeatureConfig key is used to configure the feature section in the yaml properties file.
feature name, start and end time, tag color | featureNameColor, startEndTimeColor, tagColor |
duration, duration background color | durationColor, durationBackgroundColor |
status split background, header, total color | dataBackgroundColor, dataHeaderColor, totalColor |
The properties inside the detailedScenarioConfig key is used to configure the scenario display in the yaml properties file . All the above properties in the feature section are supported in scenario section.
scenario name color | scenarioNameColor |
step bar chart plot color | stepChartBarColor |
The properties inside the detailedStepHookConfig key is used to configure the step\hook display in the yaml properties file.
The hook display options details can be found in this section.
step text, hook text color | stepTextColor, hookTextColor |
step and hook background color | stepBackgroundColor, hookBackgroundColor |
exception stacktrace color | errorMsgColor |
log message color | logMsgColor |
duration text color | durationColor |
hook display options | skipHooks, skipScenarioHooks, skipStepHooks, skipScenarioBeforeHooks, skipScenarioAfterHooks, skipStepBeforeHooks, skipStepAfterHooks |
Screenshots
The screenshots are embedded in the pdf document as attachments. These are opened in the available native application, by clicking on the pin at the top right corner of the thumbnail. These files are also available in the attachments view of the pdf document.
This can be toggled by the displayAttached setting. When the setting is set to false, only the thumbnail is displayed.
The other style of displaying zoomed screenshots in a separate section can be enabled by setting displayExpanded to true and displayAttached to false. Both the styles are mutually exclusive with the attachment method taking precedence.
Hook Display Options
The type of hook displayed in the report can be controlled. They are all false by default and will be need to be enabled. These options are mentioned in the pdf-config.yaml under the detailedStepHookConfig section. In the case of report generated by the Maven plugin this can also be configured in the pom.
Only hooks which have status as Passed are affected by these parameters. All other hooks with different status are displayed in the report.
Configuration | Description | Default |
skipHooks | All passed hooks are hidden | false |
skipScenarioHooks | All passed Scenario hooks are hidden (After & Before) | false |
skipStepHooks | All passed Step hooks are hidden (AfterStep & BeforeStep) | false |
skipScenarioBeforeHooks | All passed Scenario Before hooks are hidden | false |
skipScenarioAfterHooks | All passed Scenario After hooks are hidden | false |
skipStepBeforeHooks | All passed Step Before hooks are hidden | false |
skipStepAfterHooks | All passed Step After hooks are hidden | false |
The ‘skipHooks‘ parameter sits on top and when this is set to true then all other parameters are ignored. Then comes the ‘skipScenarioHooks‘ and the ‘skipStepHooks‘ parameters which are at the same level and when any or both of them are enabled the individual hook parameters are ignored.
For example, to hide all step hooks set the ‘skipStepHooks‘ parameter to true but the ‘skipHooks‘ parameter must be set to false or absent (default is false). In case, to hide all after step hooks set the ‘skipStepAfterHooks‘ to true but the ‘skipStepHooks‘ and ‘skipHooks‘ should be false or absent.
Report Settings via Maven plugin configuration
This method of modifying default settings is only available for PDF report generation using a Maven plugin. This is NOT available for the ExtentReport reporter style. Only a subset of the properties can be changed and below is the list of those options. The settings from the Maven plugin configuration will take precedence over the yaml file.
Configuration | Description | Default |
title | Report title | Cucumber PDF Report |
titleColor | Report title color in hex without leading # | Black |
passColor | Pass status color in hex without leading # | Green |
failColor | Fail status color in hex without leading # | Red |
skipColor | Skip status color in hex without leading # | Yellow |
displayFeature | Display feature report section | true |
displayScenario | Display scenario report section | true |
displayDetailed | Display step detailed report section | true |
displayAttached | Display media as pdf attachment | true |
displayExpanded | Display zoomed media in separate section | false |
skipHooks | All passed hooks are hidden | false |
skipScenarioHooks | All passed Scenario hooks are hidden | false |
skipStepHooks | All passed Step hooks are hidden | false |
The below configuration will create the report in a directory named ‘secret 25 4 22 14 30 30’ with only the mandatory sections – dashboard, summary and tags. The title will be ‘X File Report’ in ‘cyan (#7FFFD4)’ color. The pass, fail and skip colors will be ‘dark blue(#00008B)’, ‘brown(#964B00)’ and ‘orange(#FFA500)’ respectively.
<configuration>
<cucumberJsonReportDirectory>${project.build.directory}/json-report</cucumberJsonReportDirectory>
<cucumberPdfReportDirectory>secret</cucumberPdfReportDirectory>
<cucumberPdfReportDirectoryTimeStamp>d M yy H m s</cucumberPdfReportDirectoryTimeStamp>
<title>X Files Report</title>
<titleColor>7FFFD4</titleColor>
<passColor>00008B</passColor>
<failColor>964B00</failColor>
<skipColor>FFA500</skipColor>
<displayFeature>false</displayFeature>
<displayScenario>false</displayScenario>
<displayDetailed>false</displayDetailed>
</configuration>
Configuration changes
A sample YAML configuration file can be found here. The latest configuration changes are listed below.
- The summaryConfig key has been renamed to dashboardConfig.
- The new summaryConfig key now refers to the summary section.
- The new tagConfig key refers to the tag section.
List of earlier configuration changes.
- The startTimeColor, endTimeColor and durationColor settings in the summaryConfig (now dashboardConfig) section have been merged into a single setting timeColor.
- The itemcount setting in the featureConfig and scenarioConfig sections have been removed and the default of 10 is used.
- The mediaMsgColor setting in the detailedStepHookConfig section has been removed.
My Pom.XML includes-
io.cucumber
cucumber-java
7.18.0
io.cucumber
cucumber-testng
7.18.0
io.cucumber
cucumber-core
7.18.0
io.cucumber
cucumber-plugin
7.18.0
com.aventstack
extentreports
5.1.2
tech.grasshopper
extentreports-cucumber7-adapter
1.14.0
test
tech.grasshopper
extent-pdf-report
2.12.0
I am getting below error- Jul 07, 2024 11:22:25 AM tech.grasshopper.pdf.PDFCucumberReport collectReportConfiguration
INFO: PDF report configuration YAML file not found. Using default settings.
java.lang.NoSuchFieldError: HELVETICA
at org.vandeseer.easytable.structure.Table.(Table.java:19)
at tech.grasshopper.pdf.section.dashboard.Dashboard.createSection(Dashboard.java:33)
at tech.grasshopper.pdf.PDFCucumberReport.createDashboardSection(PDFCucumberReport.java:147)
at tech.grasshopper.pdf.PDFCucumberReport.createReport(PDFCucumberReport.java:103)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter.flush(ExtentPDFCucumberReporter.java:95)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter$1.onNext(ExtentPDFCucumberReporter.java:69)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter$1.onNext(ExtentPDFCucumberReporter.java:62)
at io.reactivex.rxjava3.subjects.PublishSubject$PublishDisposable.onNext(PublishSubject.java:310)
at io.reactivex.rxjava3.subjects.PublishSubject.onNext(PublishSubject.java:226)
at com.aventstack.extentreports.ReactiveSubject.onFlush(ReactiveSubject.java:83)
at com.aventstack.extentreports.AbstractProcessor.onFlush(AbstractProcessor.java:96)
at com.aventstack.extentreports.ExtentReports.flush(ExtentReports.java:279)
at com.aventstack.extentreports.service.ExtentService.flush(ExtentService.java:47)
at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter.finishReport(ExtentCucumberAdapter.java:301)
at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter$8.receive(ExtentCucumberAdapter.java:137)
at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter$8.receive(ExtentCucumberAdapter.java:134)
at io.cucumber.core.eventbus.AbstractEventPublisher.send(AbstractEventPublisher.java:51)
at io.cucumber.core.eventbus.AbstractEventBus.send(AbstractEventBus.java:12)
at io.cucumber.core.runtime.SynchronizedEventBus.send(SynchronizedEventBus.java:47)
at io.cucumber.core.runtime.CucumberExecutionContext.emitTestRunFinished(CucumberExecutionContext.java:117)
at io.cucumber.core.runtime.CucumberExecutionContext.finishTestRun(CucumberExecutionContext.java:104)
at io.cucumber.testng.TestNGCucumberRunner.finish(TestNGCucumberRunner.java:145)
at io.cucumber.testng.AbstractTestNGCucumberTests.tearDownClass(AbstractTestNGCucumberTests.java:57)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:139)
at org.testng.internal.invokers.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:69)
at org.testng.internal.invokers.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:393)
at org.testng.internal.invokers.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:326)
at org.testng.internal.invokers.TestMethodWorker.invokeAfterClassConfigurations(TestMethodWorker.java:229)
at org.testng.internal.invokers.TestMethodWorker.invokeAfterClassMethods(TestMethodWorker.java:215)
at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:131)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.testng.TestRunner.privateRun(TestRunner.java:819)
at org.testng.TestRunner.run(TestRunner.java:619)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:443)
at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:481)
at org.testng.internal.thread.ThreadUtil.lambda$execute$0(ThreadUtil.java:58)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
Hi,
Could you please let me know that in a situation when there will be no test case and we just want to do dry run of the application. Then what configuration we need to add in the YAML file. Because I am trying to do this but getting error
tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter flush SEVERE: An exception occurred tech.grasshopper.pdf.exception.PdfReportException: No features present in test execution.
This is a check to avoid generating any report when no features are executed. I do not think there is any point in generating a report in such cases.
could you pls let me know at what level we can add that check .
You will need to change the code. Not sure which java file does this check , will have to check. How about creating a maven profile which does not have this plugin and using it for the dry run case.
Actually I run a pipeline when I push my local branch and sometime there are no changes at test case level. So the plugin try to create a report but not able to find any test case.
But I am not able to figure out that what check I can make to handle this.
The plugin depends on cucumber to execute and create the json file. Cucumber has to discover and execute the tests.
If there are no tests to executed, there is not much point of generating a report.
Or is this exception stopping the maven build? I am a bit confused what kind of check you are looking for. Thx
Hi Mounish,
Just started using cucumber-pdf-plugin very neat – thanks!
Works really well when we have single module containing cucumbers.
However seeing some problems when have maven reactor module with multiple children each of which have their own cucumber features, wonder if any suggestions we could try?
e.g. if top level has
child1
child2
Then the pdf report for child1 works fine, but for child2 we get same error other people reported above:
java.io.IOException: The TrueType font null does not contain a ‘cmap’ table
Hi, Is this the parent-child project structure you are working with – https://books.sonatype.com/mvnex-book/reference/multimodule.html. Someone had mentioned a similar exception earlier, did not provide any further details.
What is the value of the “cucumberJsonReportDirectory” plugin configuration you are providing in the child POM’s?
Can you also provide the stacktrace, at least where it mentions the plugin code?
Thanks
Yes its very much like that.
The relevant directory structure looks like this.
parent/pom.xml
parent/target
parent/child1/pom.xml
parent/child1/src/test/java/**/*.java
parent/child1/src/test/resources/**/.*feature
parent/child1/target/cucumber-report/*.json
parent/child2/pom.xml
parent/child2/src/test/java/**/*.java
parent/child2/src/test/resources/**/.*feature
parent/child2/target/cucumber-report/*.json
If I run mvn install from child1 or child2 individually the report.pdf generates fine.
But when run mvn install from the parent which builds all the child modules only the first report is generated – child2 and subsequent all end up with an empty report.pdf
My plugin maven config is at the child level – for example child1/pom.xml has:
tech.grasshopper
cucumber-pdf-plugin
1.14.0
report
post-integration-test
pdfreport
C:\dev\workspaces\main\parent\child1\target/cucumber-report
C:\dev\workspaces\main\parent\child1\target/site/cucumber-report
yyyyMMdd_HHmmss
${project.name} report 1.1.1-SNAPSHOT
false
008900
760000
19:38:11,983 [INFO] — cucumber-pdf-plugin:1.14.0:pdfreport (report) @ child2 —
19:38:11,984 [INFO] STARTED CUCUMBER PDF REPORT GENERATION PLUGIN
Nov 15, 2023 7:38:12 PM tech.grasshopper.pdf.PDFCucumberReport collectReportConfiguration
INFO: PDF report configuration YAML file not found. Using default settings.
Nov 15, 2023 7:38:12 PM tech.grasshopper.pdf.config.verify.VerifyDisplayConfiguration verify
INFO: Detailed section display is not set to true, no attachment or expanded media display will be available.
Nov 15, 2023 7:38:12 PM tech.grasshopper.pdf.PDFCucumberReport createReport
SEVERE: An exception occurred
java.io.IOException: The TrueType font null does not contain a ‘cmap’ table
at org.apache.fontbox.ttf.TrueTypeFont.getUnicodeCmapImpl(TrueTypeFont.java:562)
at org.apache.fontbox.ttf.TrueTypeFont.getUnicodeCmapLookup(TrueTypeFont.java:542)
at org.apache.fontbox.ttf.TrueTypeFont.getUnicodeCmapLookup(TrueTypeFont.java:528)
at org.apache.fontbox.ttf.TTFSubsetter.(TTFSubsetter.java:90)
at org.apache.pdfbox.pdmodel.font.TrueTypeEmbedder.subset(TrueTypeEmbedder.java:347)
at org.apache.pdfbox.pdmodel.font.PDType0Font.subset(PDType0Font.java:263)
at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1369)
at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1344)
at tech.grasshopper.pdf.PDFCucumberReport.createReport(PDFCucumberReport.java:133)
at tech.grasshopper.CucumberPDFReportPlugin.execute(CucumberPDFReportPlugin.java:120)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:577)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
tech.grasshopper.pdf.exception.PdfReportException: java.io.IOException: The TrueType font null does not contain a ‘cmap’ table
at tech.grasshopper.pdf.PDFCucumberReport.createReport(PDFCucumberReport.java:137)
at tech.grasshopper.CucumberPDFReportPlugin.execute(CucumberPDFReportPlugin.java:120)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:577)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
Caused by: java.io.IOException: The TrueType font null does not contain a ‘cmap’ table
at org.apache.fontbox.ttf.TrueTypeFont.getUnicodeCmapImpl(TrueTypeFont.java:562)
at org.apache.fontbox.ttf.TrueTypeFont.getUnicodeCmapLookup(TrueTypeFont.java:542)
at org.apache.fontbox.ttf.TrueTypeFont.getUnicodeCmapLookup(TrueTypeFont.java:528)
at org.apache.fontbox.ttf.TTFSubsetter.(TTFSubsetter.java:90)
at org.apache.pdfbox.pdmodel.font.TrueTypeEmbedder.subset(TrueTypeEmbedder.java:347)
at org.apache.pdfbox.pdmodel.font.PDType0Font.subset(PDType0Font.java:263)
at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1369)
at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1344)
at tech.grasshopper.pdf.PDFCucumberReport.createReport(PDFCucumberReport.java:133)
… 21 more
19:38:12,107 [ERROR] STOPPING CUCUMBER PDF REPORT GENERATION – java.io.IOException: The TrueType font null does not contain a ‘cmap’ table
Will this plugin work with cucumber version 1.2.5?
Never tried it, though you can try it out. but most probably will not work.
I have been trying to get it to work with 1.2.5 and nothing happens. I can generate the json report but after that nothing happens.
what are the steps I need to follow to just create a pdf overview report of my tests?
I will try it with the version you have mentioned. Are you getting any messages\warnings\exceptions on the console?
I just remembered, it works only for 4.3.0 and above. The report uses a start timestamp value in the json report which was only added in 4.3.0.
is it true that the pdf report that is going to be generated will be limited to 14-page pdf reports?
when I am trying to implement the pdf report configuration for small number of feature file and scenarios it is working fine But the moment i am cross 66 steps it stop generating the pdf report, though spark reporter is working fine for any number of test steps 400 500 test steps ,
Let me know if I am missing any thing
PS i have used default configuration only did not implemented pdf.xml file
I have generated reports containing more than 50 pages without any issue. Are you talking of total number of steps?
DOes the console display any error for the PDF report?
Does it always fail for a specific step?
Hi
I am trying to generate a pdf report which displays pass , fail and skipped tests in the report. I am able to generate the pdf but it is generating only if all the tests are pass. If any failed tests , pdf is not generated. Below is the pom.xml
4.0.0
groupId
apptest
1.0-SNAPSHOT
18
18
UTF-8
io.github.bonigarcia
webdrivermanager
5.5.3
org.seleniumhq.selenium
selenium-java
4.13.0
org.seleniumhq.selenium
selenium-chrome-driver
4.13.0
org.seleniumhq.selenium
selenium-firefox-driver
4.13.0
io.cucumber
cucumber-java
7.14.0
io.cucumber
cucumber-junit
7.14.0
test
junit
junit
4.13.2
io.cucumber
cucumber-core
7.14.0
tech.grasshopper
cucumber-pdf-report
2.14.0
org.projectlombok
lombok
1.18.30
provided
org.apache.maven.plugins
maven-failsafe-plugin
3.0.0-M5
<!– true–>
1
true
integration-test
verify
tech.grasshopper
cucumber-pdf-plugin
1.13.0
report
post-integration-test
pdfreport
target/json-report
PDF_Report
d_M_yy H m s
Internet-Hero-App Report 7FFFD4
008000
ed0f07 FFA500
true
true true
true true
Below is the error i get.
There are test failures.
Please refer to **\App\target\surefire-reports for the individual test results.
Verify the text and url in homepage(Verify Homepage) Time elapsed: 15.17 sec <<< FAILURE!
java.lang.AssertionError
Results :
Failed tests: Verify the text and url in homepage(Verify Homepage)
Tests run: 2, Failures: 1, Errors: 0, Skipped: 0
I know where it is failing but i need report which displays failed tests as well
Are you getting any error in the console? Also you do not need to have ‘cucumber-pdf-report’ as a dependency.
Have a look at the sample report example – https://github.com/grasshopper7/cucumber-pdf-plugin-report/tree/master/cucumber-pdf-plugin-report
tech.grasshopper.exception.CucumberPDFReportPluginException: Start timestamp data of scenario is essential but is missing in json report. Plugin only generates report for Cucumber-JVM 4.3.0 and above. If Cucumber version is in the valid range, do submit an issue.
Please help in resolving this issue.
Can you add some details abut your setup?
What is the cucumber version? If it is greater than 4.3.0 can you share the json file at – grass.hopper.moc@gmail.com
Hi,
I am using karate v1.2.0 and Cucumber PDF plugin v1.11.0
I have certain features with Background where in I call once other feature file. In karate everything goes well. When the Cucumber JSON is output, there are instances where keyword is blank in json file
Due to the above reason, cucumber pdf is not generated and gives error.
Look at the snapshot of json
},
“keyword”: “*”,
“doc_string”: {
“content_type”: “”,
“value”: “19:28:30.504 << lock released, cached callonce: read('classpath:test\/sample\/sample_rest_controller\/getSampleBook.feature@samplebook')\n",
"line": 13
}
},
{
"name": "test\/sample\/sample_rest_controller\/getSampleBook.feature",
"result": {
"duration": 0,
"status": "passed"
},
"match": {
"location": "karate",
"arguments": []
},
"keyword": "",
"line": 13
},
In the last 3rd line you will see keyword is blank as "".
The error during pdf generation is [ERROR] STOPPING CUCUMBER PDF REPORT GENERATION – Keyword is null or empty for step – test/sample/sample_rest_controller/getSamplebook.feature
Can there be a fix/soltion to this issue please?
I do not have an in-depth knowledge of karate. Does it allow steps without keyword in the feature file? Can you add the step that is causing the exception?
One way is to add a parameter that will not check this for karate generated cucumber json files. I am not sure what other karate specific deviations are present in the json file. Will check.
Good to know this report also works (well, kind off) with karate. I have not tried it with karate or even thought about it.
You can easily reproduce by having a feature file with Background which has steps to callonce another feature file. I tried to manually enter some value in that json against the keyword and the pdf worked. So, ignoring a blank keyword just after a call to another feature will resolve issue.
Did you find a way to fix it or to make this plugin work with karate?
Have been kind of busy for a couple of months. I am checking on the pending issues and will have a look. Thanks.
Dear, first of all thank you for your great work, your report is one of the best for cucumber.
I wanted to see if it is possible to integrate some new features to the pdf such as:
-An initial screen with some characteristics such as a logo, browser type, time, etc.
-In details, if it is possible to give more space between features, the ideal would be to start a page per feature and they are close together.
Thanks and good job.
Thanks.
I have created a github issue – https://github.com/grasshopper7/cucumber-pdf-report/issues/40.
Can you add your inputs there? Will have a look.
Hi ,
i have added PDF-config as
passColor: 05a167
failColor: ff00ff
skipColor: a89132
displayFeature: true
displayScenario: true
displayDetailed: true
displayAttached: true
dashboardConfig:
title: wegovy Automation Report
dataBackgroundColor: 4F0CC8
titleColor: FF0000
dateColor: 969696
timeColor: 000000
dial:
featureRanges: 60 95
scenarioRanges: 70 90
stepRanges: 75 85
badColor: f768a1
averageColor: 93ffff
goodColor: 32ecab
summaryConfig:
totalColor: FF0000
durationColor: FF0000
tagConfig:
totalColor: FF0000
featureConfig:
totalColor: FF0000
durationColor: FF0000
scenarioConfig:
totalColor: FF0000
durationColor: FF0000
detailedFeatureConfig:
featureNameColor: FF0000
startEndTimeColor: 000000
tagColor: 404040
dataHeaderColor: FFFFFF
dataBackgroundColor: 404040
totalColor: 0000FF
durationColor: FFFFFF
durationBackgroundColor: 404040
detailedScenarioConfig:
featureNameColor: 404040
scenarioNameColor: FF0000
startEndTimeColor: 000000
tagColor: 404040
dataHeaderColor: FFFFFF
dataBackgroundColor: 404040
totalColor: 0000FF
durationColor: FFFFFF
durationBackgroundColor: 404040
stepChartBarColor: 7f32a8
detailedStepHookConfig:
stepTextColor: 0000FF
stepBackgroundColor: FFFFFF
hookTextColor: 00FF00
hookBackgroundColor: FFFFFF
durationColor: FF0000
errorMsgColor: 000000
logMsgColor: 000000
i get below error,if i remove the display attached line then i get error on next line, need help
jul. 08, 2022 5:36:00 PM tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter flush
SEVERE: An exception occurred
Cannot create property=displayAttached for JavaBean=ReportConfig(passColor=05a167, failColor=ff00ff, skipColor=a89132, displayFeature=true, displayScenario=true, displayDetailed=true, displayExpanded=true, summaryConfig=SummaryConfig(title=Cucumber Report, titleColor=null, dateColor=null, timeColor=null, dial=SummaryConfig.DialConfig(featureRanges=0.60 0.85, scenarioRanges=0.60 0.85, stepRanges=0.60 0.85, badColor=null, averageColor=null, goodColor=null), dataBackgroundColor=null), featureConfig=ReportConfig.FeatureConfig(featureCount=null, totalColor=null, durationColor=null, defaultCount=10), scenarioConfig=ReportConfig.ScenarioConfig(scenarioCount=null, totalColor=null, durationColor=null, defaultCount=10), detailedFeatureConfig=DetailedConfig.DetailedFeatureConfig(featureNameColor=null), detailedScenarioConfig=DetailedConfig.DetailedScenarioConfig(featureNameColor=null, scenarioNameColor=null, stepChartBarColor=null), detailedStepHookConfig=DetailedConfig.DetailedStepHookConfig(stepCount=null, stepTextColor=null, stepBackgroundColor=null, hookTextColor=null, hookBackgroundColor=null, durationColor=null, errorMsgColor=null, logMsgColor=null, defaultCount=15))
in ‘reader’, line 1, column 1:
passColor: 05a167
^
Unable to find property ‘displayAttached’ on class: tech.grasshopper.pdf.config.ReportConfig
in ‘reader’, line 7, column 18:
displayAttached: true
^
at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:291)
at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructor.java:172)
at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:332)
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:230)
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:220)
at org.yaml.snakeyaml.constructor.BaseConstructor.constructDocument(BaseConstructor.java:174)
at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:158)
at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:490)
at org.yaml.snakeyaml.Yaml.load(Yaml.java:429)
at tech.grasshopper.pdf.PDFCucumberReport.collectReportConfiguration(PDFCucumberReport.java:66)
at tech.grasshopper.pdf.PDFCucumberReport.(PDFCucumberReport.java:50)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter.flush(ExtentPDFCucumberReporter.java:68)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter.access$100(ExtentPDFCucumberReporter.java:17)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter$1.onNext(ExtentPDFCucumberReporter.java:45)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter$1.onNext(ExtentPDFCucumberReporter.java:38)
at io.reactivex.rxjava3.subjects.PublishSubject$PublishDisposable.onNext(PublishSubject.java:310)
at io.reactivex.rxjava3.subjects.PublishSubject.onNext(PublishSubject.java:226)
at com.aventstack.extentreports.ReactiveSubject.onFlush(ReactiveSubject.java:83)
at com.aventstack.extentreports.AbstractProcessor.onFlush(AbstractProcessor.java:85)
at com.aventstack.extentreports.ExtentReports.flush(ExtentReports.java:284)
at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter.finishReport(ExtentCucumberAdapter.java:300)
at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter.access$600(ExtentCucumberAdapter.java:62)
at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter$8.receive(ExtentCucumberAdapter.java:136)
at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter$8.receive(ExtentCucumberAdapter.java:133)
at io.cucumber.core.eventbus.AbstractEventPublisher.send(AbstractEventPublisher.java:51)
at io.cucumber.core.eventbus.AbstractEventBus.send(AbstractEventBus.java:12)
at io.cucumber.core.runtime.CucumberExecutionContext.emitTestRunFinished(CucumberExecutionContext.java:93)
at io.cucumber.core.runtime.CucumberExecutionContext.finishTestRun(CucumberExecutionContext.java:74)
at io.cucumber.testng.TestNGCucumberRunner.finish(TestNGCucumberRunner.java:127)
at io.cucumber.testng.AbstractTestNGCucumberTests.tearDownClass(AbstractTestNGCucumberTests.java:53)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133)
at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:62)
at org.testng.internal.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:385)
at org.testng.internal.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:321)
at org.testng.internal.TestMethodWorker.invokeAfterClassMethods(TestMethodWorker.java:217)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:130)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at org.testng.TestRunner.privateRun(TestRunner.java:794)
at org.testng.TestRunner.run(TestRunner.java:596)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:377)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:371)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:332)
at org.testng.SuiteRunner.run(SuiteRunner.java:276)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1212)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1134)
at org.testng.TestNG.runSuites(TestNG.java:1063)
at org.testng.TestNG.run(TestNG.java:1031)
at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66)
at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:109)
Caused by: org.yaml.snakeyaml.error.YAMLException: Unable to find property ‘displayAttached’ on class: tech.grasshopper.pdf.config.ReportConfig
at org.yaml.snakeyaml.introspector.PropertyUtils.getProperty(PropertyUtils.java:158)
at org.yaml.snakeyaml.introspector.PropertyUtils.getProperty(PropertyUtils.java:148)
at org.yaml.snakeyaml.TypeDescription.discoverProperty(TypeDescription.java:254)
at org.yaml.snakeyaml.TypeDescription.getProperty(TypeDescription.java:265)
at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:231)
Hi, What is the version of the cucumber adapter are you using? And also is it for cucumber 5, 6 or 7 version?
Most probably there is a mismatch between the pdf report code and the configuration file. Update to the latest adapter version which will get the latest report code also.
There have been too many changes in the report features and config file recently due to constant requests by users. It has not been managed or documented properly.
Thanks
Our frameworks is based on Appium BDD – on running our scenarios in BrowserStack device farm not able to generate PDF reports getting exception
MAven dependency:
tech.grasshopper
extentreports-cucumber6-adapter
2.8.3
Jul 06, 2022 10:35:14 PM tech.grasshopper.pdf.PDFCucumberReport createReport
SEVERE: An exception occurred
java.io.IOException: The TrueType font null does not contain a ‘cmap’ table
at org.apache.fontbox.ttf.TrueTypeFont.getUnicodeCmapImpl(TrueTypeFont.java:561)
at org.apache.fontbox.ttf.TrueTypeFont.getUnicodeCmapLookup(TrueTypeFont.java:541)
at org.apache.fontbox.ttf.TrueTypeFont.getUnicodeCmapLookup(TrueTypeFont.java:527)
at org.apache.fontbox.ttf.TTFSubsetter.(TTFSubsetter.java:90)
at org.apache.pdfbox.pdmodel.font.TrueTypeEmbedder.subset(TrueTypeEmbedder.java:346)
at org.apache.pdfbox.pdmodel.font.PDType0Font.subset(PDType0Font.java:256)
at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1349)
at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1328)
at tech.grasshopper.pdf.PDFCucumberReport.createReport(PDFCucumberReport.java:116)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter.flush(ExtentPDFCucumberReporter.java:81)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter.access$100(ExtentPDFCucumberReporter.java:19)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter$1.onNext(ExtentPDFCucumberReporter.java:56)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter$1.onNext(ExtentPDFCucumberReporter.java:49)
at io.reactivex.rxjava3.subjects.PublishSubject$PublishDisposable.onNext(PublishSubject.java:310)
at io.reactivex.rxjava3.subjects.PublishSubject.onNext(PublishSubject.java:226)
at com.aventstack.extentreports.ReactiveSubject.onFlush(ReactiveSubject.java:83)
at com.aventstack.extentreports.AbstractProcessor.onFlush(AbstractProcessor.java:85)
at com.aventstack.extentreports.ExtentReports.flush(ExtentReports.java:284)
at com.automation.mobile.listener.CucumberExtentReportListener.finishReport(CucumberExtentReportListener.java:274)
at com.automation.mobile.listener.CucumberExtentReportListener.access$600(CucumberExtentReportListener.java:31)
at com.automation.mobile.listener.CucumberExtentReportListener$8.receive(CucumberExtentReportListener.java:105)
at com.automation.mobile.listener.CucumberExtentReportListener$8.receive(CucumberExtentReportListener.java:102)
at io.cucumber.core.eventbus.AbstractEventPublisher.send(AbstractEventPublisher.java:51)
at io.cucumber.core.eventbus.AbstractEventBus.send(AbstractEventBus.java:12)
at io.cucumber.core.runtime.CucumberExecutionContext.emitTestRunFinished(CucumberExecutionContext.java:93)
at io.cucumber.core.runtime.CucumberExecutionContext.finishTestRun(CucumberExecutionContext.java:74)
at io.cucumber.testng.TestNGCucumberRunner.finish(TestNGCucumberRunner.java:127)
at com.automation.mobile.TestRunner.tearDownClass(TestRunner.java:65)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133)
at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:62)
at org.testng.internal.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:385)
at org.testng.internal.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:321)
at org.testng.internal.TestMethodWorker.invokeAfterClassMethods(TestMethodWorker.java:217)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:130)
at java.util.ArrayList.forEach(ArrayList.java:1259)
at org.testng.TestRunner.privateRun(TestRunner.java:794)
at org.testng.TestRunner.run(TestRunner.java:596)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:377)
at org.testng.SuiteRunner.access$000(SuiteRunner.java:28)
at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:418)
at org.testng.internal.thread.ThreadUtil.lambda$execute$0(ThreadUtil.java:64)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Jul 06, 2022 10:35:14 PM tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter flush
SEVERE: An exception occurred
tech.grasshopper.pdf.exception.PdfReportException: java.io.IOException: The TrueType font null does not contain a ‘cmap’ table
at tech.grasshopper.pdf.PDFCucumberReport.createReport(PDFCucumberReport.java:120)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter.flush(ExtentPDFCucumberReporter.java:81)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter.access$100(ExtentPDFCucumberReporter.java:19)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter$1.onNext(ExtentPDFCucumberReporter.java:56)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter$1.onNext(ExtentPDFCucumberReporter.java:49)
at io.reactivex.rxjava3.subjects.PublishSubject$PublishDisposable.onNext(PublishSubject.java:310)
at io.reactivex.rxjava3.subjects.PublishSubject.onNext(PublishSubject.java:226)
at com.aventstack.extentreports.ReactiveSubject.onFlush(ReactiveSubject.java:83)
at com.aventstack.extentreports.AbstractProcessor.onFlush(AbstractProcessor.java:85)
Hi, Do you have multiple cucumber runners in the project? If so then use the cucumber pdf maven plugin which creates the report from the cucumber json file. Thx.
I was trying to create pdf for a KARATEDSL project for API. The cucumber jsons that are created doesnt have “start_timestamp”: for each scenario unlike a cucumber project json. So, because of this the pdf fails to create. Can something be done to ignore the timestamp in json if possible by mentioning in the plugin configuration
This field was added in karate version 1.2.0 – https://github.com/karatelabs/karate/issues/1979. Are you using a version which has this feature? Thx.
Was working on a pdf & spark report which uses karate hooks to split up request and responses. The request & response data is then displayed as text attachments. The display should be much clearer than what you will get with the current pdf report & karate. Have not been able to pick it up recently but will tackle it time permitting.
Hi,
I’ve been experimenting using your software with ExtentReports. Unfortunately I get the following error message:
FAILED CONFIGURATION: @AfterClass tearDownClass
com.google.gson.JsonIOException: Failed making field ‘java.lang.Throwable#detailMessage’ accessible; either change its visibility or write a custom TypeAdapter for its declaring type
I’m using Java v17 (we’re not allowed to have Java v1.8 JDK anymore at work). I’ve been able to recreate this using your example project with Eclipse and changing its JDK to v17 instead of the initial v1.8.
[Name of project = cuke6-extent-adapter-report]
Do you happen to know when your software could be compatible with post Java v1.8 releases ?
Many thanks.
PS: I’ve tried various things including switching off PDF report generation but that hasn’t made any difference.
PS: The PDF report is not yet generated, just like the post from Ashirbad, June 2, 2021 at 6:02 pm
The full stack trace is:
FAILED CONFIGURATION: @AfterClass tearDownClass
com.google.gson.JsonIOException: Failed making field ‘java.lang.Throwable#detailMessage’ accessible; either change its visibility or write a custom TypeAdapter for its declaring type
at com.google.gson.internal.reflect.ReflectionHelper.makeAccessible(ReflectionHelper.java:22)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:158)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:101)
at com.google.gson.Gson.getAdapter(Gson.java:501)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:116)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:165)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:101)
at com.google.gson.Gson.getAdapter(Gson.java:501)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:116)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:165)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:101)
at com.google.gson.Gson.getAdapter(Gson.java:501)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory.create(CollectionTypeAdapterFactory.java:53)
at com.google.gson.Gson.getAdapter(Gson.java:501)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:116)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:165)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:101)
at com.google.gson.Gson.getAdapter(Gson.java:501)
at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:56)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.write(CollectionTypeAdapterFactory.java:97)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.write(CollectionTypeAdapterFactory.java:61)
at com.google.gson.Gson.toJson(Gson.java:747)
at com.google.gson.Gson.toJson(Gson.java:726)
at com.google.gson.Gson.toJson(Gson.java:701)
at com.aventstack.extentreports.reporter.JsonFormatter.flush(JsonFormatter.java:57)
at com.aventstack.extentreports.reporter.JsonFormatter.access$000(JsonFormatter.java:17)
at com.aventstack.extentreports.reporter.JsonFormatter$1.onNext(JsonFormatter.java:37)
at com.aventstack.extentreports.reporter.JsonFormatter$1.onNext(JsonFormatter.java:30)
at io.reactivex.rxjava3.subjects.PublishSubject$PublishDisposable.onNext(PublishSubject.java:310)
at io.reactivex.rxjava3.subjects.PublishSubject.onNext(PublishSubject.java:226)
at com.aventstack.extentreports.ReactiveSubject.onFlush(ReactiveSubject.java:83)
at com.aventstack.extentreports.AbstractProcessor.onFlush(AbstractProcessor.java:85)
at com.aventstack.extentreports.ExtentReports.flush(ExtentReports.java:279)
at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter.finishReport(ExtentCucumberAdapter.java:300)
at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter.access$600(ExtentCucumberAdapter.java:62)
at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter$8.receive(ExtentCucumberAdapter.java:136)
at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter$8.receive(ExtentCucumberAdapter.java:133)
at io.cucumber.core.eventbus.AbstractEventPublisher.send(AbstractEventPublisher.java:51)
at io.cucumber.core.eventbus.AbstractEventBus.send(AbstractEventBus.java:12)
at io.cucumber.core.runtime.CucumberExecutionContext.emitTestRunFinished(CucumberExecutionContext.java:93)
at io.cucumber.core.runtime.CucumberExecutionContext.finishTestRun(CucumberExecutionContext.java:74)
at io.cucumber.testng.TestNGCucumberRunner.finish(TestNGCucumberRunner.java:127)
at io.cucumber.testng.AbstractTestNGCucumberTests.tearDownClass(AbstractTestNGCucumberTests.java:53)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133)
at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:62)
at org.testng.internal.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:385)
at org.testng.internal.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:321)
at org.testng.internal.TestMethodWorker.invokeAfterClassMethods(TestMethodWorker.java:217)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:130)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.testng.TestRunner.privateRun(TestRunner.java:794)
at org.testng.TestRunner.run(TestRunner.java:596)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:377)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:371)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:332)
at org.testng.SuiteRunner.run(SuiteRunner.java:276)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1212)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1134)
at org.testng.TestNG.runSuites(TestNG.java:1063)
at org.testng.TestNG.run(TestNG.java:1031)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private java.lang.String java.lang.Throwable.detailMessage accessible: module java.base does not “opens java.lang” to unnamed module @6996db8
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
at com.google.gson.internal.reflect.ReflectionHelper.makeAccessible(ReflectionHelper.java:19)
… 68 more
Hi, The error is coming from the ‘json report’. Comment out the json report generation and other reports should be created. Refer this -> https://ghauto.tech/3196/#comment-2870. The discussion was over mail but the person, also on java 17, added the final solution in the comments. Let me know if this works in your setup.
To this date the ExtentReports main code is still only tested and released on Java 1.8. In the stack the exception is from the extent code. I do not have access or rights to update this code for a higher version.
Have created an issue to track and test this -> https://github.com/grasshopper7/extent-pdf-report/issues/6 and https://github.com/extent-framework/extentreports-java/issues/353
Thanks.
Hi,
Many thanks for the quick and useful response.
As discussed in the link above I’ve changed the extent.properties file so that it now includes:
extent.reporter.json.start=false
#extent.reporter.json.out=test-output/Json/ExtentJson.json
I’ve tested this with both v2.12 and the new v2.13 extentreports-cucumber6-adapter. I’m glad to say both work and I get the Spark and PDF reports now; using both the example project and the actual work one.
So thanks for the help on this one…
PS: I did notice a small glitch in the example project. The PDF config file is currently named “pdf-config1.yaml” which generates a Info message in the IDE:
“INFO: PDF report configuration YAML file not found. Using default settings.”
When I changed the filename to be “pdf-config.yaml” it was all okay.
Hi, Will look into a fix for the json report, seems a custom adapter for the gson conversion might fix it. The naming of the pdf configuration file is intentional so a report with default settings is created on first attempt. Then the user can rename the file and tinker with the different settings. I think this is mentioned in this or some other article. But yeah some folks are get confused by this info message and ask about it, will think about this later. Thanks.
Hi, is it possible to display the detailed step information but omit the hook information? I have an @AfterStep method in my tests which is being displayed in the report. I would like to not show this to make the report look cleaner, but I would still like the step details to be displayed. Please let me know if this is possible and how I can achieve it. Thank you!
Good point. Unfortunately this feature is not available in the current code. Will work on this over the weekend and should be available early next week. Thanks.
This has been implemented in latest version of adapters & plugins (which ever mode you are using to generated the report). Available in maven central. Read more at -> https://ghauto.tech/2224/#hookdisplay
Can cucumber extent adapter report be integrated in simple Java project without maven?
I can not create maven project due to security reasons in my project. I have added the jar file to project repository. However, it is not considering the extent.properties file configuration. Please note that I am adding the extent.properties file under my project folder and Not under src/test/resources as this is not the maven project. Please let me know if there is any option to use the cucumber extent report.
Thanks!
The extent.properties can be kept in the project root or in a package ‘com.aventstack.adapter’. – https://github.com/grasshopper7/extentreports-cucumber7-adapter/blob/9fbc09347f2c40bd22f1c20f8cb6c3bc597c1c2d/extentreports-cucumber7-adapter/src/main/java/com/aventstack/extentreports/service/ExtentService.java#L66
For a Maven project files in ‘src/test/resources’ folder will be in the project root on compilation, check the target folder.
I have a springboot BDD Cucumber framework. Using extentreports-cucumber5-adapter version 2.10.1
All my configs are done. When I run a test when no feature file present, I get a blank Extent report as expected. But when I run a feature file, Extent Report is not getting generated. Is extent Report version 5.0.9 not compatible with Spring Boot framework or what am I missing?
I had created a sample spring boot application, just ran with the extent adapter 6. Refer to extent branch – https://github.com/grasshopper7/restaurant/tree/extent. It generated the reports. Should work with 5 adapter too.
Hi,
I could see PdfReport created in test output but ExtentPdf.pdf is not getting displayed.
My extent.properties:
extent.reporter.spark.start=true
extent.reporter.json.start=true
extent.reporter.pdf.start=true
extent.reporter.klov.config=src/test/resources/klov.properties
extent.reporter.spark.config=src/test/resources/extent-config.xml
extent.reporter.spark.out=test output/Spark/ExtentSpark.html
extent.reporter.json.out=test output/Json/ExtentJson.json
extent.reporter.pdf.out=test output/PdfReport/ExtentPdf.pdf
#test,dashboard,category,exception,author,device,log
extent.reporter.spark.vieworder=dashboard,test,category,exception,author,device,log
screenshot.dir=test output/
screenshot.rel.path=../
systeminfo.os=Windows
systeminfo.version=8.1
#this is optional and creates the report in base folder name with date time format
#basefolder.name=reports
#basefolder.datetimepattern=d-MMM-YY HH-mm-ss
My pdf-config.yaml
passColor: 05a167
failColor: ff00ff
skipColor: a89132
displayFeature: true
displayScenario: true
displayDetailed: true
summaryConfig:
title: Grasshopper PDF Report
dataBackgroundColor: 4F0CC8
titleColor: FF0000
dateColor: 969696
startTimeColor: 000000
endTimeColor: 000000
durationColor: 000000
dial:
featureRanges: 60 95
scenarioRanges: 70 90
stepRanges: 75 85
badColor: f768a1
averageColor: 93ffff
goodColor: 32ecab
featureConfig:
itemcount: 10
totalColor: FF0000
durationColor: FF0000
scenarioConfig:
itemcount: 12
totalColor: FF0000
durationColor: FF0000
detailedFeatureConfig:
featureNameColor: FF0000
startEndTimeColor: 000000
tagColor: 404040
dataHeaderColor: FFFFFF
dataBackgroundColor: 404040
totalColor: 0000FF
durationColor: FFFFFF
durationBackgroundColor: 404040
detailedScenarioConfig:
featureNameColor: C0C0C0
scenarioNameColor: FF0000
startEndTimeColor: 000000
tagColor: 404040
dataHeaderColor: FFFFFF
dataBackgroundColor: 404040
totalColor: 0000FF
durationColor: FFFFFF
durationBackgroundColor: 404040
stepChartBarColor: 7f32a8
detailedStepHookConfig:
stepTextColor: 0000FF
hookTextColor: 00FF00
durationColor: FF0000
errorMsgColor: 000000
logMsgColor: 000000
mediaMsgColor: FF0000
My extent-config.xml:
dark
UTF-8
http
Extent
Cucumber Report
bottom
Runner Class Plugin:
plugin = { “pretty”,”json:target/json-report/cucumber.json”,
“com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:”
}
My pom.xml:
tech.grasshopper
cucumber-pdf-plugin
1.4.4
report
post-integration-test
pdfreport
${project.build.directory}/json-report
pdf-report
true
tech.grasshopper
extentreports-cucumber6-adapter
2.5.0
test
Can you please tell the reason why (ExtentPdf.pdf) is not getting generated
Without any error or access to code I am unable to offer any comment.
Can u try with the sample report implementation – https://github.com/grasshopper7/cuke6-extent-adapter-report and check if the report is being generated?
Hi,
I have a testng retry, in the report created the first execution of this retry is displayed as failed states, but the testng status is skipped, Are there some options to get this testng status and show it in the report?
Thanks so much!
Apologies for the delay, somehow missed this. This is not possible as the report displays Cucumber status. BTW, how are the two statuses different? Are you manually updating the test result?
Thanks for your answer.
We have 2 different statuses by TestNG, the retry function from TestNG doing automatically. The point would be if there is some way to relate the Cucumber status with TestNG status:
– TestNG status Skipped –> Cucumber status Skipped
– TestNG status Failed –> Cucumber status Failed
– TestNG status Passed –> Cucumber status Passed
Link Retry testNG: https://www.google.com/search?q=retry+failed+test+cases+in+testng&rlz=1C5CHFA_enES957ES957&oq=retry+failed+test+c&aqs=chrome.0.0i19j69i57j0i19l4j0i19i22i30l4.7839j1j7&sourceid=chrome&ie=UTF-8
As per my understanding, this will not be possible with the current code. What u can try and may succeed is to execute the tests and then manually modify the cucumber json file. Then execute the Maven plugin from command line. An example of CLI execution can be in this article https://ghauto.tech/2114/.
unable to create PDF Report using the yaml file – the folder is getting created but not working –
getting error as –
tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter flush
SEVERE: An exception occurred
Cannot create property=featureConfig for JavaBean=ReportConfig(passColor=05a167, failColor=ff00ff, skipColor=a89132, displayFeature=true, displayScenario=true, displayDetailed=true, displayExpanded=true, summaryConfig=SummaryConfig(title=Ribb 2.0 Automation PDF Report, titleColor=FF0000, dateColor=969696, timeColor=null, dial=SummaryConfig.DialConfig(featureRanges=60 95, scenarioRanges=70 90, stepRanges=75 85, badColor=f768a1, averageColor=93ffff, goodColor=32ecab), dataBackgroundColor=4F0CC8), featureConfig=ReportConfig.FeatureConfig(featureCount=null, totalColor=null, durationColor=null, defaultCount=10), scenarioConfig=ReportConfig.ScenarioConfig(scenarioCount=null, totalColor=null, durationColor=null, defaultCount=10), detailedFeatureConfig=DetailedConfig.DetailedFeatureConfig(featureNameColor=null), detailedScenarioConfig=DetailedConfig.DetailedScenarioConfig(featureNameColor=null, scenarioNameColor=null, stepChartBarColor=null), detailedStepHookConfig=DetailedConfig.DetailedStepHookConfig(stepCount=null, stepTextColor=null, stepBackgroundColor=null, hookTextColor=null, hookBackgroundColor=null, durationColor=null, errorMsgColor=null, logMsgColor=null, defaultCount=15))
in ‘reader’, line 1, column 1:
passColor: 05a167
^
Cannot create property=itemcount for JavaBean=ReportConfig.FeatureConfig(featureCount=null, totalColor=null, durationColor=null, defaultCount=10)
in ‘reader’, line 25, column 3:
itemcount: 10
^
Unable to find property ‘itemcount’ on class: tech.grasshopper.pdf.config.ReportConfig$FeatureConfig
in ‘reader’, line 25, column 14:
itemcount: 10
^
in ‘reader’, line 25, column 3:
itemcount: 10
^
at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:270)
at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructor.java:149)
at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:309)
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:204)
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:193)
at org.yaml.snakeyaml.constructor.BaseConstructor.constructDocument(BaseConstructor.java:159)
at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:146)
at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:524)
at org.yaml.snakeyaml.Yaml.load(Yaml.java:452)
at tech.grasshopper.pdf.PDFCucumberReport.collectReportConfiguration(PDFCucumberReport.java:80)
at tech.grasshopper.pdf.PDFCucumberReport.(PDFCucumberReport.java:63)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter.flush(ExtentPDFCucumberReporter.java:79)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter.access$100(ExtentPDFCucumberReporter.java:19)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter$1.onNext(ExtentPDFCucumberReporter.java:56)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter$1.onNext(ExtentPDFCucumberReporter.java:49)
at io.reactivex.rxjava3.subjects.PublishSubject$PublishDisposable.onNext(PublishSubject.java:310)
at io.reactivex.rxjava3.subjects.PublishSubject.onNext(PublishSubject.java:226)
at com.aventstack.extentreports.ReactiveSubject.onFlush(ReactiveSubject.java:83)
at com.aventstack.extentreports.AbstractProcessor.onFlush(AbstractProcessor.java:85)
at com.aventstack.extentreports.ExtentReports.flush(ExtentReports.java:284)
at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter.finishReport(ExtentCucumberAdapter.java:300)
at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter.access$600(ExtentCucumberAdapter.java:62)
at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter$8.receive(ExtentCucumberAdapter.java:136)
at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter$8.receive(ExtentCucumberAdapter.java:133)
at io.cucumber.core.eventbus.AbstractEventPublisher.send(AbstractEventPublisher.java:51)
at io.cucumber.core.eventbus.AbstractEventBus.send(AbstractEventBus.java:12)
at io.cucumber.core.runtime.CucumberExecutionContext.emitTestRunFinished(CucumberExecutionContext.java:93)
at io.cucumber.core.runtime.CucumberExecutionContext.finishTestRun(CucumberExecutionContext.java:74)
at io.cucumber.junit.Cucumber$RunCucumber.evaluate(Cucumber.java:236)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:230)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:58)
Caused by: Cannot create property=itemcount for JavaBean=ReportConfig.FeatureConfig(featureCount=null, totalColor=null, durationColor=null, defaultCount=10)
in ‘reader’, line 25, column 3:
itemcount: 10
^
Unable to find property ‘itemcount’ on class: tech.grasshopper.pdf.config.ReportConfig$FeatureConfig
in ‘reader’, line 25, column 14:
itemcount: 10
^
at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:270)
at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructor.java:149)
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:204)
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:193)
at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.newInstance(Constructor.java:283)
at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:246)
… 35 more
Caused by: org.yaml.snakeyaml.error.YAMLException: Unable to find property ‘itemcount’ on class: tech.grasshopper.pdf.config.ReportConfig$FeatureConfig
at org.yaml.snakeyaml.introspector.PropertyUtils.getProperty(PropertyUtils.java:159)
at org.yaml.snakeyaml.introspector.PropertyUtils.getProperty(PropertyUtils.java:148)
at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.getProperty(Constructor.java:287)
at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:208)
… 40 more
Using –
cucumber 6 adpater – version 2.8.4
java – 8
Remove the ‘itemcount’ setting from the yaml. This is no longer supported. Refer to ‘Configuration changes for version 1.3+’ section in the article.
Hi Monish,
I have followed the above process for creating the extent pdf report. I see default report has been created but when I am trying to give pdf-config.yaml file to customize the pdf report, .pdf file is not getting created only the folder test-output/PdfReport folder is getting created. can you advice me with the solution?
Are u getting any exception in the console? Have u placed the custom pdf-config.yaml in the src/test/resources folder?
Hi Mounish,
Thanks for this article. I used the latest version 2.8.2 but encountered an error if I execute multiple test runner. I used the testNG suite to execute the regression tests.
TestRunner 1:
@CucumberOptions(features = “src/test/java/co/uk/features”, plugin = { “pretty”, “html:target/cucumber”, “pretty:target/cucumber.json”,
“com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:” }, glue = { “co.uk.stepdefinitions” }, tags = “@UI”)
TestRunner 2:
@CucumberOptions(features = “src/test/java/co/uk/features”, plugin = { “pretty”, “html:target/cucumber”, “pretty:target/cucumber.json”,
“com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:” }, glue = { “co.uk.stepdefinitions” }, tags = “@Approval”)
TestNG Suite:
Result:
PDF report is 0byte
Logs Error Message:
Jun 20, 2021 8:25:57 AM tech.grasshopper.pdf.PDFCucumberReport createReport
SEVERE: An exception occurred
java.io.IOException: The TrueType font null does not contain a ‘cmap’ table
at org.apache.fontbox.ttf.TrueTypeFont.getUnicodeCmapImpl(TrueTypeFont.java:553)
at org.apache.fontbox.ttf.TrueTypeFont.getUnicodeCmapLookup(TrueTypeFont.java:533)
at org.apache.fontbox.ttf.TrueTypeFont.getUnicodeCmapLookup(TrueTypeFont.java:519)
at org.apache.fontbox.ttf.TTFSubsetter.(TTFSubsetter.java:90)
at org.apache.pdfbox.pdmodel.font.TrueTypeEmbedder.subset(TrueTypeEmbedder.java:321)
at org.apache.pdfbox.pdmodel.font.PDType0Font.subset(PDType0Font.java:256)
at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1349)
at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1328)
at tech.grasshopper.pdf.PDFCucumberReport.createReport(PDFCucumberReport.java:100)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter.flush(ExtentPDFCucumberReporter.java:69)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter.access$100(ExtentPDFCucumberReporter.java:17)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter$1.onNext(ExtentPDFCucumberReporter.java:45)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter$1.onNext(ExtentPDFCucumberReporter.java:38)
at io.reactivex.rxjava3.subjects.PublishSubject$PublishDisposable.onNext(PublishSubject.java:310)
at io.reactivex.rxjava3.subjects.PublishSubject.onNext(PublishSubject.java:226)
at com.aventstack.extentreports.ReactiveSubject.onFlush(ReactiveSubject.java:83)
at com.aventstack.extentreports.AbstractProcessor.onFlush(AbstractProcessor.java:85)
at com.aventstack.extentreports.ExtentReports.flush(ExtentReports.java:284)
at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter.finishReport(ExtentCucumberAdapter.java:300)
at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter.access$600(ExtentCucumberAdapter.java:62)
at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter$8.receive(ExtentCucumberAdapter.java:136)
at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter$8.receive(ExtentCucumberAdapter.java:133)
at io.cucumber.core.eventbus.AbstractEventPublisher.send(AbstractEventPublisher.java:51)
Hi, PDF report generation is not supported for multiple runners due to concurrent modification of the pdf file. This is mentioned in the article https://ghauto.tech/2098/, look for the “PDF Extent Report”. You should use the report generation plugin using JSON – https://ghauto.tech/2114/
Hi,
Thank you so much for the post.
I was trying to generate pdf report.
But I am getting the below error.
tech.grasshopper.pdf.PDFCucumberReport collectReportConfiguration
INFO: PDF report configuration not found. Using default settings.
Can you please let me know what has gone wrong.
This is not an error. When u generate the report with the default settings then this info log is written. In the ‘Display Settings’ section this is mentioned –
“””
The properties are stored in a YAML file with the name pdf-config.yaml, located in the src/test/resouces folder of the project. If the file is not present or any properties are not set, the default values are used.
“””
The report will be generated anyways. Is the report being created?
Thank you so much… Appreciate your response.
Only the empty pdf folder has been created. There is no pdf file inside.
Dependency used in pom.xml:
tech.grasshopper
extentreports-cucumber6-adapter
2.6.0
test
extent.properties file used:
extent.reporter.spark.start=true
extent.reporter.spark.out=test-output/SparkReport/Spark.html
extent.reporter.spark.config=src/test/resources/extent-config.xml
extent.reporter.spark.out=test-output/SparkReport/
screenshot.dir=test-output/
screenshot.rel.path=../
extent.reporter.pdf.start=true
extent.reporter.pdf.out=test output/PdfReport/ExtentPdf.pdf
#basefolder.name=reports
#basefolder.datetimepattern=d-MMM-YY HH-mm-ss
extent.reporter.spark.vieworder=dashboard,test,category,exception,author,device,log
systeminfo.os=WIndows
systeminfo.user=Su
systeminfo.build=1.1
systeminfo.AppName=AutomationPractice
extent-config.xml file used;
dark
UTF-8
http
Extent
Grasshopper Report
bottom
Can u share ur code in a github repo?
I was able to generate now. Not sure where I was going wrong.
Thank you so very much for your timely response.
Hi Mounish,
Thank you for this post. It is really helpful.
I’m not 100% sure however looks like there is a bug while generating the PDF file. It is working fine & I’m able to generate PDF file however when I change the value of displayDetailed from true to false, I’m getting below exception:
tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter flush
SEVERE: An exception occurred
java.lang.NullPointerException
at tech.grasshopper.pdf.annotation.Annotation.updateDestination(Annotation.java:71)
at tech.grasshopper.pdf.annotation.Annotation.lambda$updateDestination$0(Annotation.java:49)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
at tech.grasshopper.pdf.annotation.Annotation.updateDestination(Annotation.java:48)
at tech.grasshopper.pdf.PDFCucumberReport.createReport(PDFCucumberReport.java:94)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter.flush(ExtentPDFCucumberReporter.java:69)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter.access$100(ExtentPDFCucumberReporter.java:17)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter$1.onNext(ExtentPDFCucumberReporter.java:45)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter$1.onNext(ExtentPDFCucumberReporter.java:38)
at io.reactivex.rxjava3.subjects.PublishSubject$PublishDisposable.onNext(PublishSubject.java:310)
at io.reactivex.rxjava3.subjects.PublishSubject.onNext(PublishSubject.java:226)
at com.aventstack.extentreports.ReactiveSubject.onFlush(ReactiveSubject.java:83)
at com.aventstack.extentreports.AbstractProcessor.onFlush(AbstractProcessor.java:85)
at com.aventstack.extentreports.ExtentReports.flush(ExtentReports.java:284)
at com.copart.reports.CustomListener.finishReport(CustomListener.java:336)
at com.copart.reports.CustomListener.lambda$new$0(CustomListener.java:80)
at io.cucumber.core.eventbus.AbstractEventPublisher.send(AbstractEventPublisher.java:51)
at io.cucumber.core.eventbus.AbstractEventBus.send(AbstractEventBus.java:12)
at io.cucumber.core.runtime.CucumberExecutionContext.emitTestRunFinished(CucumberExecutionContext.java:93)
at io.cucumber.core.runtime.CucumberExecutionContext.finishTestRun(CucumberExecutionContext.java:74)
at io.cucumber.testng.TestNGCucumberRunner.finish(TestNGCucumberRunner.java:127)
at io.cucumber.testng.AbstractTestNGCucumberTests.tearDownClass(AbstractTestNGCucumberTests.java:53)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:134)
at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:63)
at org.testng.internal.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:348)
at org.testng.internal.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:302)
at org.testng.internal.TestMethodWorker.invokeAfterClassMethods(TestMethodWorker.java:217)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:130)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
at org.testng.TestRunner.privateRun(TestRunner.java:766)
at org.testng.TestRunner.run(TestRunner.java:587)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
at org.testng.SuiteRunner.run(SuiteRunner.java:286)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1187)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1109)
at org.testng.TestNG.runSuites(TestNG.java:1039)
at org.testng.TestNG.run(TestNG.java:1007)
at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:73)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:123)
I will look at into it. Seems to be a bug. All the other report sections are set to true? Can u add ur YAML settings file?
Just tried it. U r right it is a bug. Will fix it and release a new version.
Thx
Thank you Mounish. Please keep us updated when you release a newer version.
Thank you
I think it is fixed it but need to do combination testing just to be sure. Something I wanted to avoid initially. If all goes smoothly, a new version should be available in maven tomorrow.
Hi Mounish,
Are we releasing a new version today? Is everything looks OK from your testing?
Thank you.
It is going to be done only later tonight, if at all possible. Else it will be done over the weekend.
New version has been released. Should be available in maven pretty soon.
Hi Mounish,
I tried updating the dependency version to 2.8.2 & seeing below exception:
Jun 21, 2021 11:33:26 AM tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter flush
SEVERE: An exception occurred
org.vandeseer.easytable.RowIsTooHighException: There is a row that is too high to be drawn on a single page
at org.vandeseer.easytable.TableDrawer.computeRowsOnPagesWithNewPageStartOf(TableDrawer.java:115)
at org.vandeseer.easytable.TableDrawer.draw(TableDrawer.java:152)
at org.vandeseer.easytable.RepeatedHeaderTableDrawer.draw(RepeatedHeaderTableDrawer.java:59)
at tech.grasshopper.pdf.structure.TableCreator.drawTable(TableCreator.java:64)
at tech.grasshopper.pdf.structure.ExecutableTableCreator.displayTable(ExecutableTableCreator.java:15)
at tech.grasshopper.pdf.section.details.DetailedStepHookDisplay.display(DetailedStepHookDisplay.java:75)
at tech.grasshopper.pdf.section.details.DetailedSection.createSection(DetailedSection.java:55)
at tech.grasshopper.pdf.PDFCucumberReport.createReport(PDFCucumberReport.java:89)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter.flush(ExtentPDFCucumberReporter.java:69)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter.access$100(ExtentPDFCucumberReporter.java:17)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter$1.onNext(ExtentPDFCucumberReporter.java:45)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter$1.onNext(ExtentPDFCucumberReporter.java:38)
at io.reactivex.rxjava3.subjects.PublishSubject$PublishDisposable.onNext(PublishSubject.java:310)
at io.reactivex.rxjava3.subjects.PublishSubject.onNext(PublishSubject.java:226)
at com.aventstack.extentreports.ReactiveSubject.onFlush(ReactiveSubject.java:83)
at com.aventstack.extentreports.AbstractProcessor.onFlush(AbstractProcessor.java:85)
at com.aventstack.extentreports.ExtentReports.flush(ExtentReports.java:284)
at com.copart.reports.CustomListener.finishReport(CustomListener.java:336)
at com.copart.reports.CustomListener.lambda$new$0(CustomListener.java:80)
at io.cucumber.core.eventbus.AbstractEventPublisher.send(AbstractEventPublisher.java:51)
at io.cucumber.core.eventbus.AbstractEventBus.send(AbstractEventBus.java:12)
at io.cucumber.core.runtime.CucumberExecutionContext.emitTestRunFinished(CucumberExecutionContext.java:93)
at io.cucumber.core.runtime.CucumberExecutionContext.finishTestRun(CucumberExecutionContext.java:74)
at io.cucumber.testng.TestNGCucumberRunner.finish(TestNGCucumberRunner.java:127)
at io.cucumber.testng.AbstractTestNGCucumberTests.tearDownClass(AbstractTestNGCucumberTests.java:53)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:134)
at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:63)
at org.testng.internal.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:348)
at org.testng.internal.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:302)
at org.testng.internal.TestMethodWorker.invokeAfterClassMethods(TestMethodWorker.java:217)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:130)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
at org.testng.TestRunner.privateRun(TestRunner.java:766)
at org.testng.TestRunner.run(TestRunner.java:587)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
at org.testng.SuiteRunner.run(SuiteRunner.java:286)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1187)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1109)
at org.testng.TestNG.runSuites(TestNG.java:1039)
at org.testng.TestNG.run(TestNG.java:1007)
at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:73)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:123)
Did this work with previous version because I have not made any changes to this code area?
Do you have a step or hook with large amount of additional data which seems to be the only explanation? Can u identify it to figure out the data present?
Looks like I found the issue. If you don’t have this flag (displayDetailed: false) in your yaml file, it throws the above exception which I feel is incorrect.
The exception is only thrown when the displayDetailed flag is set to false. Is that correct? This is getting stranger by the hour now.
What are the other display settings u have?
No Mounish, this exception is thrown where the flag is not there in the yaml file. Once I uncommented it, the file got generated without any issues.
failColor: ff00ff
skipColor: a89132
displayFeature: true
displayScenario: true
#displayDetailed: false
The default setting is that all sections are generated. These can be modified in the yaml file. So if u remove the displayFeature and displayScenario in the yaml it should also work.
The exception u got earlier is still an issue. Can u give some information of the kind of data which was throwing the space not available error. Thanks
Hello,
I’m getting below exception while generating the PDF. Anyone has any idea? looks like I have all the dependencies added to my pom.xml
Jun 09, 2021 11:06:39 AM tech.grasshopper.pdf.PDFCucumberReport collectReportConfiguration
INFO: PDF report configuration YAML file not found. Using default settings.
java.lang.NoSuchMethodError: rst.pdfbox.layout.elements.Paragraph.drawText(Lorg/apache/pdfbox/pdmodel/PDPageContentStream;Lrst/pdfbox/layout/text/Position;Lrst/pdfbox/layout/text/Alignment;Lrst/pdfbox/layout/text/DrawListener;)V
at org.vandeseer.easytable.drawing.cell.ParagraphCellDrawer.drawContent(ParagraphCellDrawer.java:48)
at org.vandeseer.easytable.TableDrawer.lambda$new$0(TableDrawer.java:77)
at org.vandeseer.easytable.TableDrawer.drawRow(TableDrawer.java:212)
at org.vandeseer.easytable.TableDrawer.drawWithFunction(TableDrawer.java:195)
at org.vandeseer.easytable.RepeatedHeaderTableDrawer.lambda$drawPage$1(RepeatedHeaderTableDrawer.java:37)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at org.vandeseer.easytable.RepeatedHeaderTableDrawer.drawPage(RepeatedHeaderTableDrawer.java:37)
Are u able to generate the report? If not add ur POM. Are u using latest version? Do u have additional repositories tag in POM?
This is fine now Mounish. There was a dependency conflict in my pom.xml.
Thank you
Hi,
I have added the plugin in my pom.xml as instructed but its not generating the cucumber-pdf report.
Is the json file being generated? Have u configured the json file location correctly? Share the simplified version of ur project on github, would be easier to debug.. Thx
Yes. Now instead of using the plugin frm pom.xml. Now I am trying with ExtentReports Adapter 6.
Spark.html and ExtentJson.json are getting generated. ut for PDF report only folder is generated and inside the folder no pdf report is available.
Below is my “extent.properties” file entery:
extent.reporter.klov.start=false
extent.reporter.spark.start=true
extent.reporter.json.start=true
extent.reporter.pdf.start=true
extent.reporter.klov.config=src/test/resources/klov.properties
extent.reporter.spark.config=src/test/resources/extent-config.xml
extent.reporter.spark.out=test-output/Spark/ExtentSpark.html
extent.reporter.json.out=test-output/Json/ExtentJson.json
extent.reporter.pdf.out=test-output/PdfReport/ExtentPdf.pdf
#test,dashboard,category,exception,author,device,log
extent.reporter.spark.vieworder=dashboard,test,category,exception,author,device,log
#embed image as base64 string src default is false
#extent.reporter.spark.base64imagesrc=true
screenshot.dir=test-output
screenshot.rel.path=../
systeminfo.os=Windows
systeminfo.version=10
#this is optional and creates the report in base folder name with date time format
basefolder.name=ExtentReports/CucumberExtent-Reports
basefolder.datetimepattern=d-MMM-YY HH-mm-ss
Is there any error in the console after a line similar to “PDF report generation”?
Can u try with the sample implementation – https://github.com/grasshopper7/cuke6-extent-adapter-report?
Hi Mounish,
Below is the console output
Scenario is completed
FAILED CONFIGURATION: @AfterClass tearDownClass
java.lang.reflect.InaccessibleObjectException: Unable to make field private java.lang.String java.lang.Throwable.detailMessage accessible: module java.base does not “opens java.lang” to unnamed module @48533e64
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:177)
at java.base/java.lang.reflect.Field.setAccessible(Field.java:171)
at com.google.gson.internal.reflect.UnsafeReflectionAccessor.makeAccessible(UnsafeReflectionAccessor.java:44)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:159)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102)
at com.google.gson.Gson.getAdapter(Gson.java:458)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:117)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:166)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102)
at com.google.gson.Gson.getAdapter(Gson.java:458)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:117)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:166)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102)
at com.google.gson.Gson.getAdapter(Gson.java:458)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory.create(CollectionTypeAdapterFactory.java:53)
at com.google.gson.Gson.getAdapter(Gson.java:458)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:117)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:166)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102)
at com.google.gson.Gson.getAdapter(Gson.java:458)
at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:56)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.write(CollectionTypeAdapterFactory.java:97)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.write(CollectionTypeAdapterFactory.java:61)
at com.google.gson.Gson.toJson(Gson.java:704)
at com.google.gson.Gson.toJson(Gson.java:683)
at com.google.gson.Gson.toJson(Gson.java:658)
at com.aventstack.extentreports.reporter.JsonFormatter.flush(JsonFormatter.java:57)
at com.aventstack.extentreports.reporter.JsonFormatter.access$0(JsonFormatter.java:50)
at com.aventstack.extentreports.reporter.JsonFormatter$1.onNext(JsonFormatter.java:37)
at com.aventstack.extentreports.reporter.JsonFormatter$1.onNext(JsonFormatter.java:1)
at io.reactivex.rxjava3.subjects.PublishSubject$PublishDisposable.onNext(PublishSubject.java:310)
at io.reactivex.rxjava3.subjects.PublishSubject.onNext(PublishSubject.java:226)
at com.aventstack.extentreports.ReactiveSubject.onFlush(ReactiveSubject.java:83)
at com.aventstack.extentreports.AbstractProcessor.onFlush(AbstractProcessor.java:85)
at com.aventstack.extentreports.ExtentReports.flush(ExtentReports.java:284)
at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter.finishReport(ExtentCucumberAdapter.java:300)
at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter.access$600(ExtentCucumberAdapter.java:62)
at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter$8.receive(ExtentCucumberAdapter.java:136)
at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter$8.receive(ExtentCucumberAdapter.java:133)
at io.cucumber.core.eventbus.AbstractEventPublisher.send(AbstractEventPublisher.java:51)
at io.cucumber.core.eventbus.AbstractEventBus.send(AbstractEventBus.java:12)
at io.cucumber.core.runtime.CucumberExecutionContext.emitTestRunFinished(CucumberExecutionContext.java:93)
at io.cucumber.core.runtime.CucumberExecutionContext.finishTestRun(CucumberExecutionContext.java:74)
at io.cucumber.testng.TestNGCucumberRunner.finish(TestNGCucumberRunner.java:126)
at io.cucumber.testng.AbstractTestNGCucumberTests.tearDownClass(AbstractTestNGCucumberTests.java:53)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133)
at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:62)
at org.testng.internal.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:385)
at org.testng.internal.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:321)
at org.testng.internal.TestMethodWorker.invokeAfterClassMethods(TestMethodWorker.java:217)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:130)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.testng.TestRunner.privateRun(TestRunner.java:794)
at org.testng.TestRunner.run(TestRunner.java:596)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:377)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:371)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:332)
at org.testng.SuiteRunner.run(SuiteRunner.java:276)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1212)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1134)
at org.testng.TestNG.runSuites(TestNG.java:1063)
at org.testng.TestNG.run(TestNG.java:1031)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
PASSED: runScenario(“ERP Application Demo Scenario”, “Optional[ERP Application Demo Feature]”)
Runs Cucumber Scenarios
===============================================
Default test
Tests run: 1, Failures: 0, Skips: 0
Configuration Failures: 1, Skips: 0
===============================================
===============================================
Default suite
Total tests run: 1, Passes: 1, Failures: 0, Skips: 0
Configuration Failures: 1, Skips: 0
===============================================
What is your Java version? Java 9 and higher?
Java version is 14
I have only developed and tested this for java 8. I plan to start this in the near future but at present I am unable to help you out. For managing the module system you will have to try with your application setup. Thx.
Sorry but refer to this comment for a solution -> Refer this -> https://ghauto.tech/3196/#comment-2870.
PDF Report Generated successfully, Thanks for the help.
One last questions can we exclude hook from the pdf report?
I do not think this is possible. Will include this in next release.
Thank you
This is now possible to skip hooks etc in the report with configuration settings
I am getting exception:
Failed to parse plugin descriptor for tech.grasshopper:cucumber-pdf-report:2.2.0 (C:\Users\deepakv\.m2\repository\tech\grasshopper\cucumber-pdf-report\2.2.0\cucumber-pdf-report-2.2.0.jar): No plugin descriptor found at META-INF/maven/plugin.xml -> [Help 1]
Using Maven:
Maven Version: 3.6.3
OPEN JDK 1.14
Just ran a sample report implementation with jars in maven and it works fine. Try a ‘clean install’ maven command. Or even delete the cucumber-pdf-report folder in your repository and let maven download the jars again.
Now getting error:
[INFO] STARTED CUCUMBER PDF REPORT GENERATION PLUGIN
[ERROR] STOPPING CUCUMBER PDF REPORT GENERATION – Unable to navigate Cucumber Json report folders. Stopping report creation. Check the ‘pdfreport.cucumberJsonReportDirectory’ plugin configuration.
[INFO]
[INFO] — maven-cucumber-reporting:5.5.0:generate (execution) @ cucumber-framework —
tech.grasshopper.exception.CucumberPDFReportPluginException: Unable to navigate Cucumber Json report folders. Stopping report creation. Check the ‘pdfreport.cucumberJsonReportDirectory’ plugin configuration.
at tech.grasshopper.json.JsonPathCollector.retrieveFilePaths(JsonPathCollector.java:23)
at tech.grasshopper.CucumberPDFReportPlugin.execute(CucumberPDFReportPlugin.java:58)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
However I am able to generate Cucumber Report by using net.masterthought.
Below are my setting:
plugin = {“summary”,
“pretty”,
“html:target/cucumber-reports/advanced-reports”,
“json:target/cucumber-reports/CucumberTestReport.json”,
},
tech.grasshopper
cucumber-pdf-plugin
1.4.0
report
post-integration-test
pdfreport
${project.build.directory}/target/cucumber-reports
pdf-report
true
Have a look at ur settings again. ${project.build.directory} refers to target folder by convention. So u have an invalid directory structure with double target. Remove the target and give it a try.
Thank, Now I am able to generate the PDF report. But getting this error when running with jenkins:
[WARNING] New fonts found, font cache will be re-built
[WARNING] Building on-disk font cache, this may take a while
[WARNING] Finished building on-disk font cache, found 525 fonts
java.lang.NullPointerException
at tech.grasshopper.pdf.annotation.Annotation.updateDestination(Annotation.java:71)
at tech.grasshopper.pdf.annotation.Annotation.lambda$updateDestination$0(Annotation.java:49)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at tech.grasshopper.pdf.annotation.Annotation.updateDestination(Annotation.java:48)
at tech.grasshopper.pdf.PDFCucumberReport.createReport(PDFCucumberReport.java:94)
at tech.grasshopper.CucumberPDFReportPlugin.execute(CucumberPDFReportPlugin.java:66)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
at org.jvnet.hudson.maven3.launcher.Maven35Launcher.main(Maven35Launcher.java:130)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
at jenkins.maven3.agent.Maven35Main.launch(Maven35Main.java:178)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:139)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:70)
at hudson.remoting.UserRequest.perform(UserRequest.java:211)
at hudson.remoting.UserRequest.perform(UserRequest.java:54)
at hudson.remoting.Request$2.run(Request.java:375)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:73)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:832)
[ERROR] STOPPING CUCUMBER PDF REPORT GENERATION – null
Run the sample implementation project in ur jenkins setup. https://github.com/grasshopper7/cucumber-pdf-plugin-report. Let me know if ur having issues.
I tried this but I am getting the below error
[INFO] STARTED CUCUMBER PDF REPORT GENERATION PLUGIN
java.lang.IllegalArgumentException: U+0E1B (‘poplathai’) is not available in this font Helvetica-Oblique encoding: WinAnsiEncoding
Interesting… Which version are u using? From the stacktrace it seems u r using a earlier version. Can u try with latest version 2.1.0?
I am not using this font in the latest version of report code, but the Liberation font. Though I suspect it might still not work. Anyways give it a shot and let me know. Thanks
I’ve tried with the latest version. but it still doesn’t support the Thai or Arabic language fonts. thank you
I do not have any good or even a workable solution for you. Will look at creating a framework where multiple font families can be used for display. Restriction for me is that it needs to have a free commercial permissible license. BTW are u getting the same stack with the latest version or the characters are not displayed properly. Thanks.
I tried this but I am getting the below error
[INFO] STARTED CUCUMBER PDF REPORT GENERATION PLUGIN
java.lang.IllegalArgumentException: U+0E1B (‘poplathai’) is not available in this font Helvetica-Oblique encoding: WinAnsiEncoding
at org.apache.pdfbox.pdmodel.font.PDType1Font.encode(PDType1Font.java:418)
at org.apache.pdfbox.pdmodel.font.PDFont.encode(PDFont.java:332)
at org.apache.pdfbox.pdmodel.font.PDFont.getStringWidth(PDFont.java:363)
at tech.grasshopper.pdf.optimizer.TextLengthOptimizer.doesTextFitInSpace(TextLengthOptimizer.java:41)
at tech.grasshopper.pdf.optimizer.TextLengthOptimizer.optimizeText(TextLengthOptimizer.java:50)
at tech.grasshopper.pdf.chapter.detailed.StepOrHookRow.generateName(StepOrHookRow.java:80)
at tech.grasshopper.pdf.chapter.detailed.StepRow.generateTextOutput(StepRow.java:25)
at tech.grasshopper.pdf.chapter.detailed.StepOrHookRow.generateRow(StepOrHookRow.java:45)
at tech.grasshopper.pdf.chapter.detailed.DetailedRowComponent.display(DetailedRowComponent.java:83)
at tech.grasshopper.pdf.chapter.detailed.DetailedPage.lambda$0(DetailedPage.java:42)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
at tech.grasshopper.pdf.chapter.detailed.DetailedPage.createPage(DetailedPage.java:39)
at tech.grasshopper.pdf.chapter.detailed.DetailedChapter.sendToPage(DetailedChapter.java:115)
at tech.grasshopper.pdf.chapter.detailed.DetailedChapter.createAndSendPageData(DetailedChapter.java:83)
at tech.grasshopper.pdf.chapter.detailed.DetailedChapter.createChapter(DetailedChapter.java:28)
at tech.grasshopper.pdf.PDFCucumberReport.lambda$0(PDFCucumberReport.java:98)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
at tech.grasshopper.pdf.PDFCucumberReport.createReport(PDFCucumberReport.java:98)
at tech.grasshopper.CucumberPDFReportPlugin.execute(CucumberPDFReportPlugin.java:66)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
[ERROR] STOPPING CUCUMBER PDF REPORT GENERATION – U+0E1B (‘poplathai’) is not available in this font Helvetica-Oblique encoding: WinAnsiEncoding
Hey, I have been using your reports for a while but recently I wrote my own listener and now I want to generate PDF, but I can’t see the PDF report anywhere when trying to generate it with the plugin, and mentioning it in the pom.xml. I even tried to generate PDF using the example in the github but there also I can’t see the PDF Report for some reason. What could be the problem? Is there any other way to generate PDF report? Like using the Extent Pdf Report from your Git?
Are u getting any error? I will have a look at the sample implementation tomorrow.
Hi,
I tried this but I am getting the below error..The cucumber.json report is getting created.
[INFO] — cucumber-pdf-plugin:1.0.0:pdfreport (report) @ base —
[INFO] STARTED CUCUMBER PDF REPORT GENERATION PLUGIN
java.lang.NullPointerException
at tech.grasshopper.data.PDFCucumberReportDataGenerator.generateReportData(PDFCucumberReportDataGenerator.java:53)
at tech.grasshopper.CucumberPDFReportPlugin.execute(CucumberPDFReportPlugin.java:63)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
[ERROR] STOPPING CUCUMBER PDF REPORT GENERATION – null
Can u try with latest version of the plugin 1.2.0. There was a bug in earlier version. I have updated the article.
Hi Mounish while i am running on docker in pipeline i am getting below error plz have look
Java.awt.AWTError: Cant connect to X11 window server using ‘:99.0’ as the value of the display variable
Seems like you need to add some setting in your setup. Stackoverflow will give u a solution, have a look there.
Is it possible to add screenshots in pdf report and is there a way to pass yaml file location as parameter in extent.properties
The idea behind the pdf report was a mail or share friendly one file dashboard report. Currently adding media files like screenshots etc are not supported as it was bloating the file size. As of now not found a suitable compressing solution for base64 files. yaml file location is fixed. What is the reason for a variable location?
I need change the yaml name so that i can provide in different folder and different file name
Will look at adding this feature in a new release
Does PFD report support available for 1.2.0 plugin, I lowered the extentreports-cucumber6-adapter 2.3.0 to 1.2.0 in the pom file. Executed using mvn install but the only spark and json report generated and no PDF.
tech.grasshopper
extentreports-cucumber6-adapter
1.2.0
It only works for the latest version upwards ie 2.3.0. It needs extentreports version 5 which was upgraded in 2.0.0.