Skip to content

This plugin fills empty examples tables in cucumber feature files with combinations of predefined values. The generated combinations can be configured by various filters.

License

Notifications You must be signed in to change notification settings

gematik/cucumber-test-combinations-maven-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
logo

Cucumber-Test-Combinations-Maven-Plugin

About The Project

The Cucumber-Test-Combinations-Maven-Plugin or CuTest-Combinations-Plugin fills empty examples tables in cucumber feature files with combinations of predefined values. The generated combinations can be configured by various filters.

plugin

Release Notes

See ReleaseNotes for all information regarding the (newest) releases.

Usage

Add the following to you pom.xml and configure the plugin as you need:

<plugin>
link:pom.xml[role=include]
</plugin>

To use the plugin you have to do two things:

  1. provide "combine items" (the values which will be filled in the empty tables) as JSON file with this structure:

    [ (1)
      {
        "value": "myValue", (2)
        "tags": ["myTag"], (3)
        "properties": { (4)
            "myProp": "A"
        }
      }
    ]
    1. The file contains a list of items. You can declare as many items as you want.

    2. Each item needs a value. This value will be later inserted in the tables.

    3. Items can have tags. Tags are just Strings associated with an item and can be used by filters to manipulate the combination generation.

    4. Items can have properties. Properties are key-value pairs associated with an item and can be used by filters to manipulate the combination generation.

  2. configure the empty tables in your feature files with tags that represent your constraints

    Feature:  example feature
     Scenario Outline:
      When you do something with <column_1> and <column_2>
      Then something happens
    
        @Filter(column_1.hasTag("myTag")) (1)
        @Filter(column_1.properties["myProp"].equals(column_2.properties["myProp"])) (2)
        Examples:
          | column_1 | column_2 | (3)
    1. The plugin will only use values with the tag myTag to fill the column_1.

    2. The plugin will only generate combinations for this table where the values in column_1 and column_2 have the same property myProp

    3. An empty examples table with header names. You can access the table columns in the filter tags over their header names.

For in-depth documentation of the configuration, please refer to GettingStarted.

Contributing

If you want to contribute, please check our CONTRIBUTING.md.

License

Copyright 2025 gematik GmbH

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.

See the LICENSE for the specific language governing permissions and limitations under the License.

Additional Notes and Disclaimer from gematik GmbH

  1. Copyright notice: Each published work result is accompanied by an explicit statement of the license conditions for use. These are regularly typical conditions in connection with open source or free software. Programs described/provided/linked here are free software, unless otherwise stated.

  2. Permission notice: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    1. The copyright notice (Item 1) and the permission notice (Item 2) shall be included in all copies or substantial portions of the Software.

    2. The software is provided "as is" without warranty of any kind, either express or implied, including, but not limited to, the warranties of fitness for a particular purpose, merchantability, and/or non-infringement. The authors or copyright holders shall not be liable in any manner whatsoever for any damages or other claims arising from, out of or in connection with the software or the use or other dealings with the software, whether in an action of contract, tort, or otherwise.

    3. The software is the result of research and development activities, therefore not necessarily quality assured and without the character of a liable product. For this reason, gematik does not provide any support or other user assistance (unless otherwise stated in individual cases and without justification of a legal obligation). Furthermore, there is no claim to further development and adaptation of the results to a more current state of the art.

  3. Gematik may remove published results temporarily or permanently from the place of publication at any time without prior notice or justification.

  4. Please note: Parts of this code may have been generated using AI-supported technology. Please take this into account, especially when troubleshooting, for security analyses and possible adjustments.

About

This plugin fills empty examples tables in cucumber feature files with combinations of predefined values. The generated combinations can be configured by various filters.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages