-
Notifications
You must be signed in to change notification settings - Fork 0
Test Driven Development
schadal edited this page Dec 30, 2018
·
9 revisions
Requirements:
- JUNIT 5 library
- Eclipse IDE 2018 -12 64bit
- JEE Perspective
- Java 8 SDK
Git Reference URL https://github.com/schadal/JavaConcepts/tree/master/TddJava
About TDD
- Is there since 2003.
- TDD is a practice that comes from XP and agile manifesto.
- It is practice for developing quality code.
What is TDD? For this, we need java and eclipse setup. TDD is nothing but tests driving the code. It is a 3 step process in which we have red, green and blue color representation. With red color representing the code fails, green color represents functionality written to pass the test and finally blue color for refactoring the code.
TDD Rules
- Test should be written for expected outcome of the function.
- Do not judge the design. Tests should drive the design.
- Write minimum code to pass the test. Could be simple static code test.
- Each test case should validate one and only piece of business logic.
Integration Test:
- To test end to end test is integration testing.