![]() You think about what you want the code to do before you write it, and you save that idea in a unit test. In this process, writing the tests is what drives the development of the software. These steps are often referred to as "red, green, refactor," for the way in which the tests go from failing (red) to passing (green), with a final opportunity to improve the code and the tests (refactor). During development, this cycle is repeated over and over again hundreds or thousands of times. Improve the code (without changing its behavior).Write just enough code to pass the test. ![]() It's a tight feedback loop consisting of these steps: Test-driven development (TDD) is an iterative process for writing software, where the unit tests are developed just before the implementation. If you're interested in the benefits of unit testing for yourself, you should start with test-driven development (TDD). ![]() Unit tests can help you write better embedded software. Want to try unit testing your embedded software? Here's why you should start with TDD.
0 Comments
Leave a Reply. |