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

This is nice, thanks for taking the time to explain and write it all out. I like UI testing because I dislike maintaining mocks and stubs all over the place (and haven't found a way to write lower-level tests that don't rely on them heavily), but this approach definitely seems interesting. I like that it also forces your views to stay simple and just call simple functions. A problem resulting from not calling a handler or calling the wrong one would be immediately obvious, the tests really deal with checking what happens when that handler is called.. this seems like a great way to isolate that and test it without the pain of selenium et al! Cool pattern, thanks for sharing.


Agreed about the mocks and stubs. I dislike it too, but it's unfortunately pretty necessary if your frontend and backend are written in separate languages. If you are writing in the same language, you can actually wire up the frontend and backend together and you don't need to use test doubles! That's an architecture I've been playing around with, but unfortunately not at work.




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

Search: