Skip to content

A small, lightweight framework to speed up testing using cucumber

License

Notifications You must be signed in to change notification settings

mariocairone/cucumbersome

Repository files navigation

Cucumbersome

SonarCloud

GitHub Actions

GitHub stars GitHub forks GitHub issues GitHub release (latest by date)

Reliability Rating Maintainability Rating Security Rating

Coverage Bugs Vulnerabilities Code Smells Technical Debt

Maven Central

Cucumbersome is a small framework created to speed up the testing process using cucumber framework. The scope of the framework is to provide a collection of predefined steps to test system integrations using the following technologies:

  • HTTP
  • AMQP
  • SQL

Here is the list of available modules:

Features

Getting Started

  • Add dependencies for each module you wish to use in your pom.xml
<dependency>
  <groupId>com.mariocairone.cucumbersome</groupId>
  <artifactId>[module name]</artifactId>
  <version>[version]</version>
  <scope>test</scope>
</dependency>

You can also build the .jar files yourself, assuming you have Maven and JDK 1.8+ installed:

mvn clean install

The resulting .jar files will be located in the modules target/ folder.

You can also find SNAPSHOT builds of the latest and greatest changes to the master branch in the SonaType snapshots repository.

To add that snapshot repository to your Maven pom.xml use the following snippet:

<repositories>
    <repository>
        <id>oss-sonatype</id>
        <name>oss-sonatype</name>
        <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
</repositories>
  • Create the test class with the package glue com.mariocairone.cucumbersome.steps
import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
import org.junit.runner.RunWith;

@RunWith(Cucumber.class)
@CucumberOptions(plugin = { "pretty", "html:target/cucumber",
"json:target/cucumber/cucumber.json",
"junit:target/cucumber/cucumber.xml"},
    glue = {"com.mariocairone.cucumbersome.steps"},
    features = "classpath:features",
    strict = true)
public class CucumbersomeIT  {

}
  • (Optional) Create the configuration file cucumbersome.properties.

Example:

http.request.log=true
http.response.log=true
http.request.baseUrl=http://localhost
http.request.basePath=/
http.request.port=8080

Please refer to the module documentation for the list of available properties.

  • Write your feature file

    Cucumber Plugin

  • Run the test

mvn clean verify

Prerequisites

To build the framework the following tools are required:

  • Java Development Kit 1.8
  • Maven
  • Docker

Installing

Clone the repository and install the framework in your maven repository running the following command:

mvn clean install

Running the tests

mvn clean test

Deployment

To Deploy the framework in your remote maven repository:

  • configure the distribution management section in the parent pom

  • run the command:

mvn clean deploy

Built With

  • Maven - Dependency Management

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Mario Cairone - Initial work

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details