One weird trick to name your tests
Anup Cowkur
1013

Great article! What’s nice with Spock, loginShouldFailOnWrongPassword() becomes “login should fail on wrong password”(). Also, instead of baking in the given/when/then into the method names, with Spock we can use the given: when: then: blocks inside our test to help give our tests context. Using the Spock Reports Extension, people other than developers can read the text in those blocks to see what’s being tested. Again, great article!

Like what you read? Give Scott Hickey a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.