Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/deepak-147/unit-testing-springboot-junit-mockito
Unit Testing SpringBoot application with JUnit and Mockito
https://github.com/deepak-147/unit-testing-springboot-junit-mockito
Last synced: 7 days ago
JSON representation
Unit Testing SpringBoot application with JUnit and Mockito
- Host: GitHub
- URL: https://github.com/deepak-147/unit-testing-springboot-junit-mockito
- Owner: Deepak-147
- Created: 2023-10-15T13:14:05.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-10-15T13:25:28.000Z (about 1 year ago)
- Last Synced: 2023-10-16T15:05:31.791Z (about 1 year ago)
- Language: Java
- Size: 2.34 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TDD
Test Driven DevelopmentTest-Driven Development (TDD) is a software development approach that emphasizes writing tests before writing the actual code. This methodology has gained popularity for its ability to improve code quality, enhance maintainability, and facilitate efficient collaboration among development teams.
## Red-Green-Refactor flow
![TDD-flow](./assets/images/flow.png)TDD is a software development process that follows a cyclic pattern: Red-Green-Refactor. This cycle involves the following steps:
1. **Red**: Write a failing test for the specific functionality you’re about to implement. This test should demonstrate that the desired behavior is not currently present in the code.
2. **Green**: Write the minimum amount of code necessary to make the failing test pass. The goal is to achieve a passing test, indicating that the new functionality has been successfully added.
3. **Refactor**: Once the test passes, refactor the code to improve its design and maintainability. This step ensures that the code remains clean and well-structured.
## JUnit
JUnit is a unit testing framework designed for Java programming language.## Code Coverage
![Code-Coverage-1](./assets/images/coverage_1.png)
![Code-Coverage-2](./assets/images/coverage_2.png)