OPI Blog
Learn from experts in their fields

Browsing Tags: test

May 26, 2021
Mock Intl and Date globals in Jest
In Javascript land, mocking the browser global objects can be a bit of a pain for tests. Searching StackOverflow gives plenty of complicated answers. Some suggesting using 3rd party mock libraries. Some that overwrite the ...
Docker Image Automated Tests
We are going to explore automated testing for docker images. I found this to be a bit more difficult than application testing because images are generally built with shell scripts and I couldn’t find ...
Mar 3, 2015
Customize your Grails test reports
I’ve been writing a lot of Spock tests, and I discovered that Grails’ power asserts can be a little confusing when you’re dealing with long string representations. For example, given the simple test code: the ...
May 15, 2014
Automatically test your dirty Grails classes
Summary When refactoring code in bulk, I occasionally run into a scenario where it’s simpler to make the change all at once and run the tests afterwards than it is to test after every iteration ...
Apr 10, 2012
Grails mock objects: mockFor vs. Gmock
When writing Grails unit tests it’s often very useful to use mock objects, especially when testing service calls from controllers. Grails includes built-in support for mock objects via mockFor. The mockFor mock objects support the ...