Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>does this fact render the excuses invalid

The "mocking is hard" excuse is invalid, yes.

Sometimes it can make sense to create a dirt simple adapter whose code you very rarely have to change, which you subject to heavy manual testing. Then you mock that and leave it alone.

You can use this when converting a weird protocol into an easier to handle & easier to mock protocol.

However, that just moves the point at which you have to mock back a little, and saves you from writing lots of harness code. It doesn't prevent you from doing continuous integration or continuous deployment. It also doesn't mean you shouldn't mock. It also only makes sense if mocking is harder than actually writing, manually testing and deploying this service.

>Yes, mocking is sometimes too hard and you should not do it because the effort never pays back it's cost.

Testing is hard. Let's go shopping.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: