Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/edsonwade/demo-cucumber
This repository contains a demonstration of testing using Behavior-Driven Development
https://github.com/edsonwade/demo-cucumber
cucumber cucumber-java h2-database java jpa-hibernate mockito-junit-test postgresql spring-boot
Last synced: about 1 month ago
JSON representation
This repository contains a demonstration of testing using Behavior-Driven Development
- Host: GitHub
- URL: https://github.com/edsonwade/demo-cucumber
- Owner: edsonwade
- License: other
- Created: 2024-06-15T22:36:08.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-07-03T11:09:51.000Z (5 months ago)
- Last Synced: 2024-09-28T11:40:55.229Z (about 2 months ago)
- Topics: cucumber, cucumber-java, h2-database, java, jpa-hibernate, mockito-junit-test, postgresql, spring-boot
- Language: Java
- Homepage: https://github.com/edsonwade/demo-cucumber
- Size: 40.3 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# demo-cucumber
## Introduction
This repository contains a demonstration of testing using Behavior-Driven Development
(BDD) with Cucumber for a Java Spring Boot application.
It includes tests covering various aspects such as REST API endpoints using `MockMvc`,
`ResponseEntity`, and integration tests for controllers, services, and repositories.## Content Description
The tests are structured to ensure comprehensive coverage of different layers of the application:- **Controller Tests**: Validate the behavior of REST endpoints using `MockMvc` for simulating HTTP requests and verifying responses.
- **Service Tests**: Test the business logic and interactions within service layers.
- **Repository Tests**: Verify the interactions with the database layer using Spring's test framework.
- **BDD Tests with Cucumber**: Define and execute scenarios in a human-readable format using Gherkin syntax, enhancing collaboration between stakeholders and developers.## Implementation
### Prerequisites
- Java 8 or higher
- Maven
- Spring Boot### Running Tests
To run the tests, use the following command:
```bash
mvn testgit checkout -b feature/your-feature-name
git commit -am 'Add some feature'
git push origin feature/your-feature-name
```### Explanation:
- **Introduction**: Clearly states the purpose of the repository, which is to demonstrate BDD testing with Cucumber in a Java Spring Boot environment.
- **Content Description**: Outlines what the repository includes—tests for controllers, services, repositories, and BDD tests with Cucumber—and briefly explains their importance.
- **Implementation**: Provides practical information such as prerequisites, how to run tests, and the structure of the project directory.
- **Contribution**: Offers guidelines on how others can contribute to the project, ensuring collaboration and code quality.
- **License**: Specifies the licensing terms under which the repository is distributed.