Giter Site home page Giter Site logo

gematik / cucumber-test-combinations-maven-plugin Goto Github PK

View Code? Open in Web Editor NEW
4.0 5.0 0.0 452 KB

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: Apache License 2.0

Java 96.43% Gherkin 2.41% Roff 0.99% EQ 0.08% Nearley 0.08%
other testing-tools tim

cucumber-test-combinations-maven-plugin's Introduction

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 2023 gematik GmbH

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

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the LICENSE for the specif ic language governing permissions and limitations under the License.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.