/**
* Determines if first or second are evenly divisible by the other.
**/

Next, make the project. After it builds, run ./RandoTest. Your test should fail (and highlight in red).

Since you now have a failing test, you should write code specifically to resolve that failed test. Edit rando.cpp to update the solution. When you think you have resolved the failed test, repeat building the project and running the tests. If your test still fails, return and continue to fix the function until it passes.

Once your first test passes, then you can repeat this process: write a test, run the test (with failure), write the solution, run the test (until passing).

Repeat this process until you have decided that your tests would fail any wrong implementation and would pass any right implementation. Then, read over your implemented code and refactor it to make sure it uses good style, is consistent with its documentation, and fits within its class.

This method is specifically called "Red Light, Green Light" Test-Driven Development, where the green light represents a passing test that indicates you can go on to the next test-develop cycle. Test-Driven Development was popularized as a part of eXtreme Programming by Kent Beck who summarized it as "Test-a-little, Code-a-little."

Now that you have practiced Test-Driven Development (TDD), write one paragraph to summarize your thoughts. How did testing first impact how you thought about the problem? What do you think is the biggest benefit of TDD? What do you find most challenging? Submit your paragraph for this assignment.

Deliverables:

A paragraph reflecting on first experiences with Test-Driven Development

Assessment:

Students should demonstrate meta-cognition of reflecting over their first experience with Test-Driven Development and how it impacted their approach to programming

Comments:

Additional Information:

Knowledge Area/Knowledge Unit

Software Engineering

Topic

Test-Driven Development

Level of Difficulty

Programming a new unit test takes intermediate expertise of C++ and imperative programming

Estimated Time to Completion

Writing a new unit test and its corresponding solution should take between 20-40 minutes. Writing a reflection on the process should take an additional 10 minutes for a total of up to 50 minutes.