cucumber-results-aggregator-plugin

A maven plugin to aggregate Cucumber results from a multi module project

License

License

Categories

Categories

Cucumber Application Testing & Monitoring
GroupId

GroupId

com.github.vincent-fuchs
ArtifactId

ArtifactId

cucumber-results-aggregator-plugin
Last Version

Last Version

1.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

cucumber-results-aggregator-plugin
A maven plugin to aggregate Cucumber results from a multi module project
Project URL

Project URL

https://github.com/vincent-fuchs/cucumber-results-aggregator-plugin
Source Code Management

Source Code Management

https://github.com/vincent-fuchs/cucumber-results-aggregator-plugin

Download cucumber-results-aggregator-plugin

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.vincent-fuchs/cucumber-results-aggregator-plugin/ -->
<dependency>
    <groupId>com.github.vincent-fuchs</groupId>
    <artifactId>cucumber-results-aggregator-plugin</artifactId>
    <version>1.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.vincent-fuchs/cucumber-results-aggregator-plugin/
implementation 'com.github.vincent-fuchs:cucumber-results-aggregator-plugin:1.0.2'
// https://jarcasting.com/artifacts/com.github.vincent-fuchs/cucumber-results-aggregator-plugin/
implementation ("com.github.vincent-fuchs:cucumber-results-aggregator-plugin:1.0.2")
'com.github.vincent-fuchs:cucumber-results-aggregator-plugin:jar:1.0.2'
<dependency org="com.github.vincent-fuchs" name="cucumber-results-aggregator-plugin" rev="1.0.2">
  <artifact name="cucumber-results-aggregator-plugin" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.vincent-fuchs', module='cucumber-results-aggregator-plugin', version='1.0.2')
)
libraryDependencies += "com.github.vincent-fuchs" % "cucumber-results-aggregator-plugin" % "1.0.2"
[com.github.vincent-fuchs/cucumber-results-aggregator-plugin "1.0.2"]

Dependencies

compile (5)

Group / Artifact Type Version
org.apache.maven : maven-plugin-api jar 2.0
net.sf.json-lib : json-lib jar 2.4
org.slf4j : slf4j-log4j12 jar 1.7.9
com.google.code.gson : gson jar 2.3.1
org.apache.ant : ant jar 1.9.4

test (2)

Group / Artifact Type Version
org.assertj : assertj-core jar 1.7.0
junit : junit jar 4.11

Project Modules

There are no modules declared in this project.

cucumber-results-aggregator-plugin

This Maven plugin is a workaround to a problem I am facing regularly : in a multi-module project, if we have Cucumber tests spread in various modules, we can't publish a single aggregated view in Jenkins.

The goal of this Maven plugin is to aggregate Cucumber results from a configured list of subModules, so that it can be processed by Cucumber reporting plugin, as it was all coming from a single module.

Plugin configuration

Assuming you have a structure like this :

myProject
|-->module1
|-->module2
|-->module3
-pom.xml

If you have Cucumber results in 2 modules (module1 and module3), you can configure the plugin like this :

<plugin>
  <groupId>com.github.vincent-fuchs</groupId>
  <artifactId>cucumber-results-aggregator-plugin</artifactId>
  <version>1.0.1</version>
  <executions>
    <execution>
      <id>execution</id>
      <phase>integration-test</phase>
      <goals>
        <goal>aggregate</goal>
      </goals>
      <configuration>
        <modules>
          <module>module1</module>
          <module>module3</module>
        </modules>
      </configuration>
    </execution>
  </executions>
</plugin>

It will :

  • look into the 2 modules for /target/cucumber/*.json files (this can be overridden in configuration with filePattern attribute)
  • generate an aggregatedCucumberResults.json file in target directory of main project (myProject). It will be sorted following the order of configured modules. Then for each module, it will follow the alphabetical order

You can then configure maven-cucumber-reporting plugin to read this file and generate the reports.

Versions

Version
1.0.2
1.0.1