Skip to content

NachoBrito/bdd-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Complete example of a BDD process

This project contains the code from my article "Behaviour-Driven Development in practice"

catalog-spec

The catalog-spec folder contains the specification project for the Catalog Service.

The project is cloned from the cucumber-java-skeleton and uses Maven for automation. The command

mvn test

will run the Behavior Tests against a service deployed on http://localhost:8080. You can change the endpoint by editing the OpenAPI file.

catalog-service

In catalog-service you will find the service implementation. It is a Micronaut application that implements the interface defined in OpenAPI.

Generate code from OpenAPI:

Thanks to the embedded OpenAPI code generator included with the Micronaut Maven plugin, the command:

mvn compile

Will generate the model classes, as well as the interface definition, for the REST layer.

Run service tests

The command:

mvn test

Will execute both Unit and Integration tests.

In order to run the Behavior Tests defined in the specification project, you need to run first this service with the command:

mvn mn:run

About

Full example of a BDD development process

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published