Donut Maven Plugin

Sweet reports for the icing over your automated tests

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

io.magentys
ArtifactId

ArtifactId

donut-maven-plugin
Last Version

Last Version

0.0.5
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

Donut Maven Plugin
Sweet reports for the icing over your automated tests
Project URL

Project URL

http://maven.apache.org
Source Code Management

Source Code Management

https://github.com/MagenTys/donut-maven-plugin

Download donut-maven-plugin

How to add to project

<plugin>
    <groupId>io.magentys</groupId>
    <artifactId>donut-maven-plugin</artifactId>
    <version>0.0.5</version>
</plugin>

Dependencies

compile (3)

Group / Artifact Type Version
org.apache.maven : maven-plugin-api jar 3.2.5
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.4
io.magentys : donut jar 0.0.4

test (1)

Group / Artifact Type Version
junit : junit jar 4.11

Project Modules

There are no modules declared in this project.

Build Status Maven Central

donut-maven-plugin

This is a maven plugin for donut. More about donut here.

usage

in your pom.xml add the plugin with the following configuration:

<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>My Custom 1</name>
                      <value>custom123</value>
                   </customAttribute>
                   <customAttribute>
                      <name>App Name</name>
                      <value>${app.name}</value>
                   </customAttribute>
                </customAttributes>
            </configuration>
        </execution>
    </executions>
</plugin>

For older versions, use groupId as io.magentys and an appropriate version.

all configuration parameters

<resultSources>
<outputPath>
<prefix>
<timestamp>
<template>
<countSkippedAsFailure>
<countPendingAsFailure>
<countUndefinedAsFailure>
<countMissingAsFailure>
<projectName>
<projectVersion>
<customAttributes>

default values:

  • resultSources : is mandatory and it should be specify multiple result sources that detail the result format and location.
  • outputPath : by default a donut folder will be generated
  • prefix : the generated file is donut-report.html, however you can specify prefix i.e. myproject-
  • timestamp : refers to the start time of your execution. If not specified by the user reports will use now
  • template : donut supports 2 themes, default and light. default is the default value.
  • countSkippedAsFailure, countPendingAsFailure, countUndefinedAsFailure, countMissingAsFailure: are boolean values, and by default they are set to false.
  • projectName : is a string value
  • projectVersion : is a string value
  • customAttributes : is a map of name/value pairs

report timestamp

As it may take a while to execute your tests, Donut expects that you pass the start timestamp, otherwise will default it to now at the time of the report execution. The format should be yyyy-MM-dd-HHmm

Example:

<properties>
   <maven.build.timestamp.format>yyyy-MM-dd-HHmm</maven.build.timestamp.format>
</properties>

Contributing

To contribute:

  • Create an integration test to demonstrate the behaviour under src/it/. For example, to add support to default the report prefix to an empty string:
    • Create src/it/default-empty-prefix
    • Copy the contents of the src/it/default-empty-prefix directory and update the pom as appropriate to demonstrate the configuration. Update the verify.groovy to implement the test for your feature.
    • Run mvn clean install -Prun-its to run the integration tests.

License

This project is under an MIT license

Powered by: MagenTys & Mechanical Rock

Versions

Version
0.0.5
0.0.4
0.0.3
0.0.1