Just really quickly here. Here's a question I posted on the Testing sub-channel of the #CFML Slack channel:
Question: I have a function which is basically a cron job which gets stuff from one data repository, monkeys with it, then sends the monkeying back to a different repository.
I log stuff along the way, for example:
- "process started"
- "got n records"
- "need to update m records"
- "job done"
Currently I am actively testing that "got n records" reflects the right value for n (where n in the context of the test is a test value coming back from a mock), and similarly with "need to update m records".
On one hand I think "well that's an important partial 'result' from the process, so - yes - test for it".
On the other hand I go "hmmm... is it? Or is that implementation detail?"
Thoughts?
That's it, really. Not an answer to anything today; just a question for you. What do you think?
--
Adam