https://github.com/2kabhishek/stringcalculatortdd
Learning TDD with StringCalculator 🧪🧮
https://github.com/2kabhishek/stringcalculatortdd
tdd tdd-java tdd-kata test-driven-development
Last synced: 11 days ago
JSON representation
Learning TDD with StringCalculator 🧪🧮
- Host: GitHub
- URL: https://github.com/2kabhishek/stringcalculatortdd
- Owner: 2KAbhishek
- License: gpl-3.0
- Created: 2021-05-26T06:49:28.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-05-09T05:46:25.000Z (about 3 years ago)
- Last Synced: 2025-03-01T12:48:15.249Z (about 1 year ago)
- Topics: tdd, tdd-java, tdd-kata, test-driven-development
- Language: Java
- Homepage: https://2kabhishek.github.io/StringCalculatorTDD
- Size: 112 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Inspiration
`Test Driven Development` or `TDD` is something I was hearing a lot but didn't fully understand.
This little project is my way of exploring and learning it's fundamentals.
## What it does
StringCalculatorTDD is a project created for TDD beginners as a solution for [TDD Kata 1 - String Calculator](https://osherove.com/tdd-kata-1).
## Prerequisites
Before you begin, ensure you have met the following requirements:
- You have installed the latest version of `java, testng, maven`
## Exploring StringCalculatorTDD
To explore StringCalculatorTDD, follow these steps:
```bash
git clone https://github.com/2kabhishek/StringCalculatorTDD
cd StringCalculatorTDD
code . # Or any other of your favorite editor
```
## Using StringCalculatorTDD
After cloning the project one good way to learn from it would be using git history.
Just do a `git log` and look at the changes, you can go through the entire process of TDD one step at a time.
## How it was built
StringCalculatorTDD was built using `Java` and `TestNG`, the IDE used was `Eclipse`.
## Challenges faced
Wrapping my head around the laws of TDD, which are:
- You are not allowed to write any production code unless it is to make a failing unit test pass.
- You are not allowed to write any more of a unit test than is sufficient to fail.
- You are not allowed to write any more production code than is sufficient to pass one failing test.
## What I learned
I learned why TDD is used and how it helps us in producing, bug free maintainable code.
The cycle of TDD is somewhat as such:
- Write a failing unit test
- Write code to pass the test
- Refactor if necessary
I also learned about TestNG, which is a more feature rich equivalent of JUnit.
## What's next
Probably use TDD in more of my future projects.
Hit the :star: button if you found this useful.
## More Info