Regression testing grails plugins
For regression testing the grails plugins I've released, I have a shell script that:
Now all I have to do is run the application and test it through the browser (potential for selenium to help here?). This is great for testing the plugin against a new grails version, or just for testing code changes to the plugin itself.
I put the script in <project_home>/test/regression/run.sh and the resources in <project_home>/test/regression/resources. The resources directory contains files like domain objects etc in the same directory layout as a normal grails project. This way I just need to copy the contents of the resources directory over the top of my newly created project.
I should have written it as an ANT script though (what was I thinking?) - then it would be platform independent. I'll migrate it to ANT soon.
I'd appreciate any comments about the process though - is it useful to you?
Download the script here. Use it with care, it does delete some directories.
- cleans up any previous runs
- packages the current code for the plugin OR downloads a release from my web site
- creates a new grails app
- copies preprepared resources into this new grails app
- installs the plugin
Now all I have to do is run the application and test it through the browser (potential for selenium to help here?). This is great for testing the plugin against a new grails version, or just for testing code changes to the plugin itself.
I put the script in <project_home>/test/regression/run.sh and the resources in <project_home>/test/regression/resources. The resources directory contains files like domain objects etc in the same directory layout as a normal grails project. This way I just need to copy the contents of the resources directory over the top of my newly created project.
I should have written it as an ANT script though (what was I thinking?) - then it would be platform independent. I'll migrate it to ANT soon.
I'd appreciate any comments about the process though - is it useful to you?
Download the script here. Use it with care, it does delete some directories.