Giter Club home page Giter Club logo

cucumber-testng-restapi's Introduction

Spring boot - cucumber - demo

This demo is about putting in place a cucumber scenario in a Spring boot environment with different technologies.

Objective

Create a reference implementation which provides the best practices of running integration & component tests in a SpringBoot application.

Technologies

Spring Boot Test - Provides the spring boot ecosystem required for the tests.
Cucumber 6.8.0
TestNg 7.1.0
Java 1.8
Maven 4.0

Paths

addresse.feature : src/test/resources/features/adresse.feature
java class representing the models : src/test/java/com/example/demo/model
java step definitions : src/test/java/com/example/demo/stepDefinition
cucumber runner : src/test/

Running tests

  1. Open terminal in the project repo, then execute mvn clean install
  2. After running the application, the result is generated in : target/site/serenity/index.html

Struggles

As far as the researches took me, Serenity is no compatible with testNg.
To activate Serenity report for the test we shall use the annotation @RunWith(SerenityRunner.class),
meanwhile this annotation work only with JUnit.
To check the default test report please go into target/cucumber/report-html.
In this link serenity-bdd/serenity-core#691 a member of Serenity BDD John Ferguson confirm that in 2020
serenity still does not support testNg.
Github repository https://github.com/wakaleo/serenity-core where we can only find serenity-JUnit.

NB : I will be more than interesting if any explanation or working example is provided. Thank you !

Wire mock implementation

wire mock server implementation is being in comment. check stepDefinition.java file and CucumberRunner.java

cucumber-testng-restapi's People

Contributors

mznibe49 avatar

Watchers

 avatar

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.