To a beginner writing unit tests may seem to be an overhead and a low productive affair. But this could be due to the way he chooses to write tests. One can quite easily be productive at writing unit test cases as well. Following are a few things that I follow to write the spock unit tests cases in the grails application. I hope these...
The final day of SpirngOne 2GX went just like a Mega Finale where they kept best for the last. There were only 3 sessions today, but each one was like one of the best. Here the few highlights of the sessions # Micro Service Architecture with Spring Boot and Groovy : Marco Vermeulen Beautifully explained the concept of micro...
Grails version 2.0 and above made unit testing much simpler with so many new annotations introduced. However if you wanted to mock a specific method of a class whose method is being tested or you wanted to create a stub of the class already annotated by @Mock, things would become difficult. So I always ended up mocking methods via...
While writing a test case, we are generally interested in executing only the one we are working on. With JUnit test case in grails we could say "grails test-app <ClassName>.<currentTestCase>". However it doesn't work with spock specification's. Spock framework provides multiple cool annotations, following two annotations...
While using Geb for fuctional testing i require some deugging support so i use PageChangeListener and i found it very useful to find flow of pages while testing my application fuctionally.What it does is it will show the page flow from one page to another.For that we need to just register the PageChangeListener with browser in your ...