What are the steps for TDD?
A. Write the passing test, write the code, run the test again to validate that it still passes.
B. Write the failing test, write the code, run the test again to validate that it passes.
C. Write the code, write the test to validate that it passes, run the test again to validate that it still passes.
D. Write the passing test, write the code, break the code, run the test again to validate that it fails.
References: http://www.daoudisamir.com/references/vs_ebooks/html5_css3.pdf
Answer is B.
I am quoting the ‘Programming in HTML5 with JavaScript and CSS3’ training guide in pdf format by Glenn Johnson. Page 98 says:
“When using TDD, always write the test first, run it to see
the test fail, and then add code to make the test pass.”
6
0
Yep, exactly. Red-Green-Refactor.
0
0