bell notificationshomepageloginNewPostedit profile

Topic : This is not different from what happens in the real world. You could solve your problem like we do in actual development - by being test driven. I.e., make the test a significant part of - selfpublishingguru.com

10% popularity

This is not different from what happens in the real world. You could solve your problem like we do in actual development - by being test driven. I.e., make the test a significant part of your tutorial, and make it a high-level feature test (not a unit test).

This way, the reader can execute the test after each step, and get a different error message each time. For example, in Ruby on Rails:

Write a test that says "if the user clicks the new link XYZ, then the value ABC is read from the DB and displayed".
First error message will be "link XYZ not found".
Reader implements (only) the link, with a "href" pointing to the appropriate (new) controller/action.
Next error message will be "no route found"
Reader implements the route in config/routes.rb.
Next error message will be "controller not found"
Reader implements an empty controller.
Next error message will be "action not found in controller"
Reader implements the action.
Next error message will be "view template not found"
Reader implements the view template.
Next error message will be "value ABC not visible"

... and so on, and so forth.

Obviously, this works best if your language/framework of choice is good for this kind of development, and if you have spent time before setting up the testing environment in the context of your tutorial.


Load Full (0)

Login to follow topic

More posts by @Pope4766717

0 Comments

Sorted by latest first Latest Oldest Best

Back to top