G-Func Grails Functional Testing Plugin 1.2
Not much more than a week has passed, and we’re onto 1.2 already. 1.1 had excessive debug output I left in by mistake…
It is in the plugin repo now, and “grails install-plugin functional-test” should work.
The docs at http://grails.org/Grails+Functional+Testing have been updated – there were several errata but there are also new features and one breaking change. I know, we started at 1.0 but … its a good change and few people will be affected at this point
New are… Javascript on/off, Grails 1.1 compatibility, text area support, cookie support, proper redirect handling (some limitations currently), and lots of output improvements and fixes.
BREAKING CHANGE:
Setting the value of selects, checkboxes and radio button groups is now just a simple property assignment. So where before you had:
form(‘myform’) {
radioOptions.checked = “option3″
}
You now just have:
form(‘myform’) {
radioOptions= “option3″
}
Which is more consistent with other field access.
Also the test output files contain useful information about followed redirects and values set and items clicked, for when you need to debug a failing test!
Here’s the changelog from JIRA:
GRAILSPLUGINS-772 FIXED Add support for disabling JavaScript
GRAILSPLUGINS-771 FIXED Add support for getting/setting textarea fields
GRAILSPLUGINS-773 FIXED Enable redirect following by default, and add property to turn it off
GRAILSPLUGINS-779 FIXED Sometimes requests will not update the current page data
GRAILSPLUGINS-783 FIXED Allow resolution of form buttons by VALUE if no element can be found by id/name
GRAILSPLUGINS-781 FIXED Allow user to clear the CSS+JS cache during a test
GRAILSPLUGINS-784 FIXED Breaking change – make it so that setting value of checkbox/radio/selects does not need x.checked or x.select
GRAILSPLUGINS-786 FIXED Improve output captured so that headers and assignments to fields are easily seen
GRAILSPLUGINS-785 FIXED Provide access to cookies and enabled/disable cookies
GRAILSPLUGINS-788 FIXED Rework it so that redirects that are followed show in output and correct request method shown for redirect after POST
Enjoy! Thanks to Peter for the work on Grails 1.1 compat.
No related posts.