DBC User wrote:
testing is pointing to test database anyway?
Because manual and automated tests should use different databases.
When you manually test, you need a generally sloppy set of records to
around with. Suppose you set up a given Person record, such as “Mr.
Frootloop”. Each time you change the code and manually test, you want
same record to come back in the same state as you left it.
You should run your automated tests much more often than you manually
Your automated should have an exact set of data fixtures, and you don’t
the tests to die just because you manually changed a record. So you need
your tests to erase the entire database each time they run.
Put these rules together, and you need two databases. Your “manual test
fixture”, Mr Frootloop, will not disappear just because you ran the
Tip: Configure the automated tests to run automatically, each time you
change the code. Then get in the habit of saving your files
and trying to predict the result of each test run. If you guess wrong,
can always Undo your last edit until the tests pass again. This is a lot
better than endlessly debugging!
“Test Driven Ajax (on Rails)”