My question is along similar lines as, and was actually inspired by, Using Test::More to unit test T-SQL. I was wondering if any monks have experience writing tests for code that relies on externally controlled data sources?
My specific example is I'm writing modules to perform simple statistical analysis on .db files created by a bayesian spam filter. The big problem I see is these files are modified by the spam filter on a regular basis, so I can't simply take known values out of the .db and assume they will stay the same. Are there any standard practices for dealing with this type of thing? Perhaps I should create my own .db files specifically for testing?
Oh, and why can't I just insert then delete known values into the database and test on those? Because I'm afraid to modify the .db files for fear of breaking the seemingly fragile bayesian spam filter. :)
In reply to testing externally controlled data sources by revdiablo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |