donutreport / donut-maven-plugin Goto Github PK
View Code? Open in Web Editor NEWOur Maven plugin for Donut Reports
Home Page: http://donutreport.github.io/donut
License: MIT License
Our Maven plugin for Donut Reports
Home Page: http://donutreport.github.io/donut
License: MIT License
When running mvn clean install -DskipTests
via the command line the build will fail as no report is produced. The build should not fail as we are intentionally not running any tests.
After upgrading to the latest version (1.2.2), screenshots are missing in the report html. Prior to the update, screenshots were getting attached to the failed scenarios.
Donut Configuration
Cucumber Dependency
The failed screenshots are available in the cucumber report folder. However, donut is failing to attach it to the report.
Console Log
[INFO] --- donut-maven-plugin:1.2.2:generate (reporting) @ XXX_Automation ---
[INFO] Generating reports...
[WARNING] Could not lookup path List(projectMetadata, projectVersion) in List(Identifier(List(projectMetadata, projectVersion)))
[INFO] Donuts created at: C:\XXX_Automation\target\donut/donut-report.html
The latest version of donut provides the capability to pass custom attributes to the report. Update the maven plugin to enable custom attributes to be specified.
Generating report fails if feature file contain Tag eg.:
Test.feature ->
@testTag
Feature: Test
Scenario: Test
Given test
This results with:
[ERROR] No feature reports found at: /home/user/Desktop/proj/target/cucumber-parallel
donut-maven-plugin:0.0.6
[ERROR] Failed to execute goalreport.donut:donut-maven-plugin:0.0.6:generate (execution) on project taf-chips: Error Found:: Input length = 1 -> [Help 1]
The error is not very meaningful but we discovered the build fails when there are special characters in the cucumber feature file. For example:
"%!@£$%^&*( “ ” ' ' « » … ° © ® ™ • ½ ¼ ¾ ⅓ ⅔ № † ‡ µ ¢ £ € ♤ ♧
♥️ ♢ ✓)"
Removing those characters from cucumber.json fixes the problem, however it's painful having to manually go through json and remove all special characters especially if the feature file is massive.
Interesting fact is that it only happens on windows machines. Works fine one Mac no matter if the special characters are there or not.
Donut-Maven-Plugin is not supporting Cucumber-Junit latest version.
Latest cucumber Junit version is 4.2.0.
Also donut should support the 'Rerun Failing Tests' capability which is introduced in the latest version of Junit.
I have upgraded my test project to Cucumber 4.7.2, donut 1.2.2 and donut-maven-plugin 1.2.2 from cucumber 1.2.5, donut 1.1 and donut-maven-plugin 0.0.5. And I also changed plugin configuration to the one provided in the current Readme.md.
donut-maven-plugin
version 0.0.5 with configuration bonded to pre-intergration-test phase was working fine when called from the command line as a standalone task.
mvn io.magentys:donut-maven-plugin:0.0.5:generate
But after version the update the similar report generation task in the build fails with the following exception:
mvn report.donut:donut-maven-plugin:1.2.2:generate
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal report.donut:donut-maven-plugin:1.2.2:generate (default-cli) on project bbsw-test-harness: Required parameter `resultSources` not set.
While the plugin configuration clearly has this parameter:
<plugin>
<groupId>report.donut</groupId>
<artifactId>donut-maven-plugin</artifactId>
<version>1.2.2</version>
<executions>
<execution>
<id>execution</id>
<phase>post-integration-test</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<resultSources>
<resultSource>
<!-- optional format, defaults to cucumber -->
<format>cucumber</format>
<directory>${project.build.directory}/cucumber-reports</directory>
</resultSource>
</resultSources>
<outputPath>${project.build.directory}/donut</outputPath>
<timestamp>${maven.build.timestamp}</timestamp>
<template>default</template>
<projectName>${project.name}</projectName>
<!-- optional customAttributes -->
<customAttributes>
<customAttribute>
<name>App Name</name>
<value>blah</value>
</customAttribute>
</customAttributes>
</configuration>
</execution>
</executions>
</plugin>
Maven version 3.6.2.
What am I missing?
Update:
Maven debug log:
[DEBUG] Configuring mojo report.donut:donut-maven-plugin:1.2.2:generate from plugin realm
ClassRealm[plugin>report.donut:donut-maven-plugin:1.2.2, parent: sun.misc.Launcher$AppClassLoader@4e25154f]
[DEBUG] Configuring mojo 'report.donut:donut-maven-plugin:1.2.2:generate' with basic configurator
-->
[DEBUG] (f) countMissingAsFailure = false
[DEBUG] (f) countPendingAsFailure = false
[DEBUG] (f) countSkippedAsFailure = false
[DEBUG] (f) countUndefinedAsFailure = false
[DEBUG] (f) customAttributes = []
[DEBUG] (f) outputPath = D:\Projects\bbsw-test-harness\target\donut
[DEBUG] (f) resultSources = []
[DEBUG] (f) skip = false
[DEBUG] (f) template = default
[DEBUG] -- end configuration --
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.