testing

Testing tools, testing philosophy & methodology...
ljosa 2019-02-08T17:14:31.041200Z

Example of where this sort of testing is useful for me. What does your nose say?

seancorfield 2019-02-08T17:57:02.041700Z

You have one function that is doing too much.

seancorfield 2019-02-08T17:58:15.042900Z

Test each individual function. Then test the orchestration function end-to-end as a black box instead of testing that makes specific calls to implementation functions.

ljosa 2019-02-08T18:05:01.043800Z

So I am testing the individual functions that I have stubbed out here (`extract-userintent-from-s3`, etc.) elsewhere. This is an attempt to test the orchestration function extract-transform-and-load-xxx.

seancorfield 2019-02-08T18:19:39.045Z

Like I say, test end-to-end or don't bother testing. The orchestration function should be so simple it's "correct by inspection" and, if not, refactor it to be so.

seancorfield 2019-02-08T18:20:24.045700Z

If writing tests for something is painful, then either the code is too complex or the test is not worth doing.

seancorfield 2019-02-08T18:21:00.046500Z

You're also introducing a lot of coupling in your tests which will make them brittle.