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

I love this. I started with trying to have simple, short and descriptive names for the test methods but then it doesn't work quite well with more complicated test cases. So I grew to like something along these lines:

given_someInput_someOtherInput_when_doX_then_thisThingHappen_thatThingHappen

which has the advantage to be optimised for reading. When I want to skim over the test class quickly I can simply look at the method names to get an idea on what the test is doing and if I want more details I can look further at it's implementation



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

Search: