TDD testing application entry points -


i'm new tdd, , quite far (even though it's adjustment process).

however, i'm struggling how go testing entry points application. mean main(string... args) method, class single responsibility load , save properties file from/to disk, etc.

when doing code first, didn't seem problem. wouldn't write test kind of methods/classes. however, how supposed follow tdd process when there's code have write without tests?

in other words, when/how writing entry points fit tdd development process?

in cases, can't unit test entry point, because, definition, unit test tests unit in isolation dependencies.

in trivial edge cases, application's entry point composition root - is, place units integrated. while perform full systems test on entry point, should treat humble executable.

my personal rule humble executable can contain no logic (only composition), , measure cyclomatic complexity; if cyclomatic complexity of humble executable 1, it's okay not test it.

however, although can't unit test entry points, can still use outside-in tdd drive composition, although you'd typically still need replace external services test doubles.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -