You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'll take a peek at that, but I could use a little bit of assistance in determining what the most-testable object is. I have only the foggiest of clues.
Assuming you're using objects with methods, or even if you're just using functions, the most testable will be methods/functions with one input, one output, and no side effects.
Higher-level functional tests can cover some less-well-written code, in that you get the test passing, and later change a method with a side effect somewhere in the spaghetti and suddenly your test fails. For example, let's say scanning all message bases for new messages is a horrible clusterfuck, you may still be able to test it at a higher level by creating/deleting/foo-ing fake messages in a test DB and then having the test blow up if the output of the clusterfuck is incorrect. This is less good than unit testing but it still has value in preventing regressions which are very common in spaghetti code.
So what I meant was, "in your source, either find the blob of best-written functions connected to an object or not, or if they're scattered everywhere, make a list of some simple well-written ones." Then you can learn the ins and outs of both testing itself and the particular framework and related concepts (e.g. code coverage) while writing tests for code that hopefully won't immediately be exposed as needing 25 hours of refactoring as soon as you write tests you expect to pass which don't.
On Mon, 02 Mar 2015 19:56:04 -0800, Damon Getsman [email protected] wrote:
I'll take a peek at that, but I could use a little bit of assistance in determining what the most-testable object is. I have only the foggiest of clues.
Reply to this email directly or view it on GitHub: #69 (comment)
This might do it: https://theintern.github.io/
The text was updated successfully, but these errors were encountered: