|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
[ANN] Grails Testing Examples Winelovers Application (London GGUG)
Following from the London GGUG talk we gave on Wednesday it was time to provide the widercommunity some visibility on the reference testing application which showcases a full running application with some sample user stories. In this app you will find examples showing
You can checkout the project at inside of which the presentation we made is provided and can be accessed directly at Sadly the video of the presentation has not been digitized following some technical snafu causing the loss of sound on the recording with the Skills Matter equipment :( Running the application The app ships *without* any of the required plugins installed so to enable the most very basic test run (test-app) you will at least need the testing-plugin developed by Peter Ledbrook @ G2One. The latest 0.3 version presently available will need to be installed, which simply involves issuing command
grails install-plugin testing in the root of the project folder For the remaining testing types the installation of the plugins should not interfere with the existing reference test examples .. they are already created and checked into the correct locations for them to run following a plugin install
JSUnit Again, you need to install the plugin to run the test examples for Javascript testing
grails install-plugin jsunit For further information on how to run the tests locally follow the grails page: the main point is you need to provide a path (and on windows you will need to give 8.3 short names, since spaces aren't handled) to Firefox
Selenium Install the plugin grails install-plugin selenium Then run-app in one console and in another grails run-selenium ${path-to-browser} EasyB By far the most experimental part of the project is the integration of EasyB BDD for Groovy with Grails. Should you wish to explore this you will have to install the plugin for this directly as a zip from
The examples which are shown test (at a unit level)
and integration wise
These are liable to be changed to use the testing plugin example also at some stage in the coming two weeks. Outstanding
I have yet to complete the examples for webtest, but will aim to do so a soon as its possible. Feedback
I would welcome any feedback and any examples people would like added or updated, or suggestions for more examples/plugins etc. The project is provided as-is with no warranty or guarantees! I strive to make sure it is not broken or with issues, but as with all part time projects you should be aware that sometimes things go wrong.
When making feedback it may be preferable to contact me directly unless the material under discussion has relevance to the list. When reporting issues please outline
Hope this if of use to people Cheers |
|
|
Re: [ANN] Grails Testing Examples Winelovers Application (London GGUG)Great stuff. Wish I could have been there, but I was on baby sitting duties :-(
Keep it up On Fri, Oct 3, 2008 at 11:29 AM, j pimmel <frankly.watson@...> wrote: > All > > Following from the London GGUG talk we gave on Wednesday it was time to > provide the widercommunity some visibility on the reference testing > application which showcases a full running application with some sample user > stories. In this app you will find examples showing > > unit tests (defined against the new testing plugin, 0.3) > > domain/command objects > controllers > taglib > plain old groovy objects > JSUnit > EasyB > > integration tests > > services > > acceptance testing > > selenium > > You can checkout the project at > https://svn.energizedwork.com/skunkworks/grails/WineLovers > > inside of which the presentation we made is provided and can be accessed > directly at > https://svn.energizedwork.com/skunkworks/grails/WineLovers/test/resources/grails-effective-testing-talk.ppt > > Sadly the video of the presentation has not been digitized following some > technical snafu causing the loss of sound on the recording with the Skills > Matter equipment :( > > Running the application > The app ships *without* any of the required plugins installed so to enable > the most very basic test run (test-app) you will at least need the > testing-plugin developed by Peter Ledbrook @ G2One. The latest 0.3 version > presently available will need to be installed, which simply involves issuing > command > > grails install-plugin testing > > in the root of the project folder > For the remaining testing types the installation of the plugins should not > interfere with the existing reference test examples .. they are already > created and checked into the correct locations for them to run following a > plugin install > JSUnit > Again, you need to install the plugin to run the test examples for > Javascript testing > > grails install-plugin jsunit > > For further information on how to run the tests locally follow the grails > page: the main point is you need to provide a path (and on windows you will > need to give 8.3 short names, since spaces aren't handled) to Firefox > http://grails.org/jsUnit+plugin > http://www.javathinking.com/?p=123 > > Selenium > Install the plugin > > grails install-plugin selenium > > Then run-app in one console and in another > > grails run-selenium ${path-to-browser} > > EasyB > By far the most experimental part of the project is the integration of EasyB > BDD for Groovy with Grails. > Should you wish to explore this you will have to install the plugin for this > directly as a zip from > http://code.google.com/p/easyb/source/browse/trunk/easyb-plugins/grails-plugin/grails-easybtest-0.1.zip > > The examples which are shown test (at a unit level) > > domain > plain old groovy > > and integration wise > > controller > service > > These are liable to be changed to use the testing plugin example also at > some stage in the coming two weeks. > Outstanding > I have yet to complete the examples for webtest, but will aim to do so a > soon as its possible. > Feedback > I would welcome any feedback and any examples people would like added or > updated, or suggestions for more examples/plugins etc. > The project is provided as-is with no warranty or guarantees! I strive to > make sure it is not broken or with issues, but as with all part time > projects you should be aware that sometimes things go wrong. > When making feedback it may be preferable to contact me directly unless the > material under discussion has relevance to the list. > When reporting issues please outline > > What plugins you have installed > What piece of code is at issue > Steps you undertook to create the issue > (if available) your code fix that you found resolved it > > Hope this if of use to people > Cheers -- Graeme Rocher Grails Project Lead G2One, Inc. Chief Technology Officer http://www.g2one.com --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: [ANN] Grails Testing Examples Winelovers Application (London GGUG)I really enjoyed the talk and left with plenty to think about! I had never tried Selenium before, but I'm currently enjoying putting test cases together for it!
|
|
|
Re: [ANN] Grails Testing Examples Winelovers Application (London GGUG)Hello, Jerome:
Thanks very much for the work on the WineLovers example. This helped me figure out how to get going with the grails easybtest plugin. My experience was that for Grails 1.0.4 the plugin installs fine, but there seem to be some glitches when I try to install into a Grails 1.1 environment. I would submit a bug report, but I'm not sure where it should go. Nothing on this list -> http://jira.codehaus.org/browse/GRAILSPLUGINS seems related to easybtest. Any guidance much appreciated. The detailed steps that I followed and the error that I got when installing into a Grails 1.1 environment are shown below. (again this all ran pretty much without incident with Grails 1.0.4 ) Grails 1.0.4 svn co https://svn.energizedwork.com/skunkworks/grails/WineLovers cd WineLovers grails install-plugin testing grails install-plugin easybtest grails easyb-test I get the nice html reports on test results Console output is -> 11 total behaviors run 1 total failures 1 test seems to fail. But at least it runs.. For me that's a good starting point. Next, Grails 1.1 (same steps) svn co https://svn.energizedwork.com/skunkworks/grails/WineLovers cd WineLovers grails install-plugin testing grails install-plugin easybtest Full Output from last 2 commands shown below... note inability to install easybtest. grails install-plugin testing Welcome to Grails 1.1 - http://grails.org/ Licensed under Apache Standard License 2.0 Grails home is set to: c:/home/ryden/3rdparty/java/grails-1.1 Base Directory: C:\tmp\e2\WineLovers Running script c:\home\ryden\3rdparty\java\grails-1.1\scripts\InstallPlugin.groovy Environment set to development Reading remote plugin list ... Reading remote plugin list ... Plugin list out-of-date, retrieving.. [delete] Deleting: C:\Users\Ryden\.grails\1.1\plugins-list-default.xml [get] Getting: http://plugins.grails.org/.plugin-meta/plugins-list.xml [get] To: C:\Users\Ryden\.grails\1.1\plugins-list-default.xml ............................................................................................................................................................................................................................................................... [get] last modified = Thu Apr 16 17:39:10 PDT 2009 [get] Getting: http://plugins.grails.org/grails-testing/tags/RELEASE_0_5/grails-testing-0.5.zip [get] To: C:\Users\Ryden\.grails\1.1\plugins\grails-testing-0.5.zip ..................................................................................................................... [get] last modified = Tue Feb 03 09:14:45 PST 2009 [copy] Copying 1 file to C:\Users\Ryden\.grails\1.1\projects\WineLovers\plugins Installing plug-in testing-0.5 [mkdir] Created dir: C:\Users\Ryden\.grails\1.1\projects\WineLovers\plugins\testing-0.5 [unzip] Expanding: C:\Users\Ryden\.grails\1.1\plugins\grails-testing-0.5.zip into C:\Users\Ryden\.grails\1.1\projects\WineLovers\plugins\testing-0.5 Executing testing-0.5 plugin post-install script ... Plugin testing-0.5 installed Ryden@dell-laptop2: /tmp/e2/WineLovers > grails install-plugin easybtest Welcome to Grails 1.1 - http://grails.org/ Licensed under Apache Standard License 2.0 Grails home is set to: c:/home/ryden/3rdparty/java/grails-1.1 Base Directory: C:\tmp\e2\WineLovers Running script c:\home\ryden\3rdparty\java\grails-1.1\scripts\InstallPlugin.groovy Environment set to development Reading remote plugin list ... Reading remote plugin list ... [copy] Copying 1 file to C:\Users\Ryden\.grails\1.1\projects\WineLovers\plugins Installing plug-in easybtest-0.2 [mkdir] Created dir: C:\Users\Ryden\.grails\1.1\projects\WineLovers\plugins\easybtest-0.2 [unzip] Expanding: C:\Users\Ryden\.grails\1.1\plugins\grails-easybtest-0.2.zip into C:\Users\Ryden\.grails\1.1\projects\WineLovers\plugins\easybtest-0.2 Executing easybtest-0.2 plugin post-install script ... Warning, target causing name overwriting of name default Warning, target causing name overwriting of name default Warning, target causing name overwriting of name default [mkdir] Created dir: C:\tmp\e2\WineLovers\test\reports\html [mkdir] Created dir: C:\tmp\e2\WineLovers\test\reports\plain [mkdir] Created dir: C:\tmp\e2\WineLovers\test\reports\xml [copy] Copied 8 empty directories to 5 empty directories under C:\Users\Ryden\.grails\1.1\projects\WineLovers\resources ---------------------------------------------------------- This project is provided for education and tutorial purposes. Should now really be run on Grails 1.0.4 To make the best use of this project, please install the easybtest-0.2 plugin To make the best use of this project, please install the jsunit-0.3 plugin To make the best use of this project, please install the selenium-0.5 plugin To make the best use of this project, please install the testing-0.3 plugin To make the best use of this project, please install the webtest-0.5.1 plugin Direct queries about the content here to J Pimmel <frankly.watson@gmail.com> ---------------------------------------------------------- Plugin [easybtest-0.2] is installed, but was not found in the application's metadata, do you want to uninstall? (y, n) y [delete] Deleting directory C:\Users\Ryden\.grails\1.1\projects\WineLovers\plugins\easybtest-0.2 : Unable to delete file C:\Users\Ryden\.grails\1.1\projects\WineLovers\plugins\easybtest-0.2\lib\easyb-0.9.4.jar at org.apache.tools.ant.taskdefs.Delete.handle(Delete.java:620) at org.apache.tools.ant.taskdefs.Delete.removeDir(Delete.java:679) at org.apache.tools.ant.taskdefs.Delete.removeDir(Delete.java:675) at org.apache.tools.ant.taskdefs.Delete.execute(Delete.java:543) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) at org.apache.tools.ant.Task.perform(Task.java:348) at _PluginDependencies_groovy$_run_closure25.doCall(_PluginDependencies_groovy:702) at _PluginDependencies_groovy$_run_closure25.doCall(_PluginDependencies_groovy) at _PluginDependencies_groovy$_run_closure4.doCall(_PluginDependencies_groovy:174) at _GrailsCompile_groovy$_run_closure3.doCall(_GrailsCompile_groovy:84) at _GrailsCompile_groovy$_run_closure2.doCall(_GrailsCompile_groovy:55) at Script1.run(Script1.groovy:31) at _PluginDependencies_groovy$_run_closure19.doCall(_PluginDependencies_groovy:557) at _PluginDependencies_groovy$_run_closure26.doCall(_PluginDependencies_groovy:805) at _GrailsPlugins_groovy.completePluginInstall(_GrailsPlugins_groovy:80) at _GrailsPlugins_groovy.this$4$completePluginInstall(_GrailsPlugins_groovy) at _GrailsPlugins_groovy$this$4$completePluginInstall.callCurrent(Unknown Source) at _GrailsPlugins_groovy.withPluginInstall(_GrailsPlugins_groovy:68) at _GrailsPlugins_groovy.this$4$withPluginInstall(_GrailsPlugins_groovy) at _GrailsPlugins_groovy$_run_closure4.doCall(_GrailsPlugins_groovy:60) at _GrailsPlugins_groovy$_run_closure5.doCall(_GrailsPlugins_groovy:110) at gant.Gant$_dispatch_closure4.doCall(Gant.groovy:324) at gant.Gant$_dispatch_closure6.doCall(Gant.groovy:334) at gant.Gant$_dispatch_closure6.doCall(Gant.groovy) at gant.Gant.withBuildListeners(Gant.groovy:344) at gant.Gant.this$2$withBuildListeners(Gant.groovy) at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source) at gant.Gant.dispatch(Gant.groovy:334) at gant.Gant.this$2$dispatch(Gant.groovy) at gant.Gant.invokeMethod(Gant.groovy) at gant.Gant.processTargets(Gant.groovy:495) at gant.Gant.processTargets(Gant.groovy:480) Error installing plugin: Unable to delete file C:\Users\Ryden\.grails\1.1\projects\WineLovers\plugins\easybtest-0.2\lib\easyb-0.9.4.jar: Unable to delete file C:\Users\Ryden\.grails\1.1\projects\WineLovers\plugins\easybtest-0.2\lib\easyb-0.9.4.jar Ryden@dell-laptop2: /tmp/e2/WineLovers > Ryden@dell-laptop2: /tmp/e2/WineLovers > grails install-plugin easybtest Welcome to Grails 1.1 - http://grails.org/ Licensed under Apache Standard License 2.0 Grails home is set to: c:/home/ryden/3rdparty/java/grails-1.1 Base Directory: C:\tmp\e2\WineLovers Running script c:\home\ryden\3rdparty\java\grails-1.1\scripts\InstallPlugin.groovy Environment set to development Reading remote plugin list ... Reading remote plugin list ... Installing plug-in easybtest-0.2 You currently already have a version of the plugin installed [easybtest-0.2]. Do you want to upgrade this version? (y, n) n Plugin easybtest-0.2 install aborted Ryden@dell-laptop2: /tmp/e2/WineLovers > grails install-plugin easybtest Welcome to Grails 1.1 - http://grails.org/ Licensed under Apache Standard License 2.0 Grails home is set to: c:/home/ryden/3rdparty/java/grails-1.1 Base Directory: C:\tmp\e2\WineLovers Running script c:\home\ryden\3rdparty\java\grails-1.1\scripts\InstallPlugin.groovy Environment set to development Reading remote plugin list ... Reading remote plugin list ... Installing plug-in easybtest-0.2 You currently already have a version of the plugin installed [easybtest-0.2]. Do you want to upgrade this version? (y, n) y [delete] Deleting directory C:\Users\Ryden\.grails\1.1\projects\WineLovers\plugins\easybtest-0.2 [mkdir] Created dir: C:\Users\Ryden\.grails\1.1\projects\WineLovers\plugins\easybtest-0.2 [unzip] Expanding: C:\Users\Ryden\.grails\1.1\plugins\grails-easybtest-0.2.zip into C:\Users\Ryden\.grails\1.1\projects\WineLovers\plugins\easybtest-0.2 Executing easybtest-0.2 plugin post-install script ... Warning, target causing name overwriting of name default Warning, target causing name overwriting of name default Warning, target causing name overwriting of name default [copy] Copied 2 empty directories to 1 empty directory under C:\Users\Ryden\.grails\1.1\projects\WineLovers\resources ---------------------------------------------------------- This project is provided for education and tutorial purposes. Should now really be run on Grails 1.0.4 To make the best use of this project, please install the easybtest-0.2 plugin To make the best use of this project, please install the jsunit-0.3 plugin To make the best use of this project, please install the selenium-0.5 plugin To make the best use of this project, please install the testing-0.3 plugin To make the best use of this project, please install the webtest-0.5.1 plugin Direct queries about the content here to J Pimmel <frankly.watson@gmail.com> ---------------------------------------------------------- Plugin [easybtest-0.2] is installed, but was not found in the application's metadata, do you want to uninstall? (y, n) y [delete] Deleting directory C:\Users\Ryden\.grails\1.1\projects\WineLovers\plugins\easybtest-0.2 : Unable to delete file C:\Users\Ryden\.grails\1.1\projects\WineLovers\plugins\easybtest-0.2\lib\easyb-0.9.4.jar at org.apache.tools.ant.taskdefs.Delete.handle(Delete.java:620) at org.apache.tools.ant.taskdefs.Delete.removeDir(Delete.java:679) at org.apache.tools.ant.taskdefs.Delete.removeDir(Delete.java:675) at org.apache.tools.ant.taskdefs.Delete.execute(Delete.java:543) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) at org.apache.tools.ant.Task.perform(Task.java:348) at _PluginDependencies_groovy$_run_closure25.doCall(_PluginDependencies_groovy:702) at _PluginDependencies_groovy$_run_closure25.doCall(_PluginDependencies_groovy) at _PluginDependencies_groovy$_run_closure4.doCall(_PluginDependencies_groovy:174) at _GrailsCompile_groovy$_run_closure3.doCall(_GrailsCompile_groovy:84) at _GrailsCompile_groovy$_run_closure2.doCall(_GrailsCompile_groovy:55) at Script1.run(Script1.groovy:31) at _PluginDependencies_groovy$_run_closure19.doCall(_PluginDependencies_groovy:557) at _PluginDependencies_groovy$_run_closure26.doCall(_PluginDependencies_groovy:805) at _GrailsPlugins_groovy.completePluginInstall(_GrailsPlugins_groovy:80) at _GrailsPlugins_groovy.this$4$completePluginInstall(_GrailsPlugins_groovy) at _GrailsPlugins_groovy$this$4$completePluginInstall.callCurrent(Unknown Source) at _GrailsPlugins_groovy.withPluginInstall(_GrailsPlugins_groovy:68) at _GrailsPlugins_groovy.this$4$withPluginInstall(_GrailsPlugins_groovy) at _GrailsPlugins_groovy$_run_closure4.doCall(_GrailsPlugins_groovy:60) at _GrailsPlugins_groovy$_run_closure5.doCall(_GrailsPlugins_groovy:110) at gant.Gant$_dispatch_closure4.doCall(Gant.groovy:324) at gant.Gant$_dispatch_closure6.doCall(Gant.groovy:334) at gant.Gant$_dispatch_closure6.doCall(Gant.groovy) at gant.Gant.withBuildListeners(Gant.groovy:344) at gant.Gant.this$2$withBuildListeners(Gant.groovy) at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source) at gant.Gant.dispatch(Gant.groovy:334) at gant.Gant.this$2$dispatch(Gant.groovy) at gant.Gant.invokeMethod(Gant.groovy) at gant.Gant.processTargets(Gant.groovy:495) at gant.Gant.processTargets(Gant.groovy:480) Error installing plugin: Unable to delete file C:\Users\Ryden\.grails\1.1\projects\WineLovers\plugins\easybtest-0.2\lib\easyb-0.9.4.jar: Unable to delete file C:\Users\Ryden\.grails\1.1\projects\WineLovers\plugins\easybtest-0.2\lib\easyb-0.9.4.jar Ryden@dell-laptop2: /tmp/e2/WineLovers > |
| Free embeddable forum powered by Nabble | Forum Help |