I want to start working with TDD but I don't know really where to start. We coding with .NET (C#/ASP.NET).
Five steps of test-driven developmentRead, understand, and process the feature or bug request. Translate the requirement by writing a unit test. If you have hot reloading set up, the unit test will run and fail as no code is implemented yet. Write and implement the code that fulfills the requirement.
The main idea is to start the development process by writing tests covering your functionality. With that done, write source code that will work for every test case that you create. As you begin working on each new feature, first — add missing tests related to the required functionalities and only then implement it.
Test-driven development (TDD) is an approach to software development where you write tests first, then use those tests to drive the design and development of your software application.
See the questions Why should I practice Test Driven Development and how should I start?, Moving existing code to Test Driven Development, What is unit testing? and What is TDD?
I would start by reading up on TDD and why it's a good practice. As you read that, try to think about how the concepts apply to your own projects.
When I was learning TDD, it seemed simple at first, but it's such a paradigm shift that it forced me to change the way I thought about how my program would work. And I guess that's kind of the point. :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With