You really don't want to push that out to prod and end up with test crap in your database.
All too true, hence my initial idea to have the module check whether it was being tested or not. When in testing mode it would insert data records with a clearly identifiable "TEST" mark which would be easy to remove even if the test totally crashed and did not clean-up at the end.
But I'm now convinced that a test database is probably the better choice.
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
In reply to Re^2: How to make a module aware it is being tested?
by CountZero
in thread How to make a module aware it is being tested?
by CountZero
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |