News
Greach Ticket give away
After attending many years Greach Conf, I got a talk accepted this year. I will be talking about Grails interview questions. As a speaker, I get a free ticket. However, I had already purchased a complete ticket. Thus, I am giving that ticket away to a Groovy Calamari reader. Just drop me an email if you are interested. Even better, tweet about Groovy Calamari with the hashtag #groovylang and I will draw a winner by the end of February.
Spock
Spock: Testing Async Code
This week I needed to test async code. I found it is easy to test async code using async conditions with Spock.
Spock Title and Narrative
@pwojna shows you two Spock annotations you may not be familar with @Title and @Narrative. Make your tests more readable.
Spock: Disable a test case with @PendingFeature annotation
I was not familiar with this one:
Moreover, Spock 1.1 introduces one more interesting way to disable test case called Pending Feature. If you mark test case with a @PendingFeature annotation, it will have following behavior: if it fails, it will be reported as skipped (ignored) test case, as test case for unimplemented feature is not important for overall test result; if it passed, it will be reported as failed (sic!) test case, as it’s strange that test case for unimplemented features succeeded, so it should be explicitly reported:
Tests Suites in Spock
I did not know Spock supported test suites. Apparently thanks to a configuration in src/test/resources/SpockConfig.groovy, it does.
Sponsored Link
GR8Conf EU Doorbuster tickets for sale
G8Conf DOORBuster tickets started selling yesterday. Half of them are gone already.
Copenhagen in June, Yeah baby!
Grails
Mastering Grails 3 Plugins
@alvaro_sanchez talk about mastering plugins in Grails 3 is a must watch for any Grails plugin developer.
Learn about how to exclude content, how to modularize your plugin, how to test it, how to publish it. In summary, master your plugin development with the help of Spring Security REST for Grails Plugin's author. One of my most beloved plugins in the Grails ecosystem.
Run Geb Functional Tests in Grails 3 with multiple Browsers
Apologies for the self-linking but this week I published a guide which may help you out if you are using Geb with Grails. Use Geb, it is awesome.
Comment
While learning how to test async code with Spock, I found a Spock presentation by @yermilov17. In the past, I have linked to a lot of Spock's content in Groovy Calamari. Moreover, I will content to share more links to Spock in the future. Spock is an amazing part of the Groovy Ecosystem and deserves a lot of attention.
However, this presentation has surprised me a lot. It compares, to great detail, Spock, JUnit, TestNG and JUnit 5. While doing so, it uncovers so many gems. Enjoy!
Sergio del Amo