Good morning all!
I am new to Intellij, Grails, Groovy, Spock and Geb ...and I have been asked to create automated tests in Geb to run as a stand-alone and also via TeamcCity! :)
Apart from being new, I have really enjoyed writting automated tests in Geb. Now that I have some experience under my belt, I would like some help on either optimizing my tests or understanding where I missed the boat.
Here is how I run the tests
1- Click "Run"
command line: test-app functional: -echoOut
VM parameters: -DbaseURL=http://qa-server -Dgeb.driver=firefox
2- Execute the following (abridged)
Letting agent QTJA do the transformation
Grails home is set to: C:\grails-1.3.6
Base Directory: C:\<dir>
Dependencies resolved in 23884ms.
Running script C:\grails-1.3.6\scripts\TestApp.groovy
Environment set to test
[groovyc] Compiling 17 source files to C:\Projects\<dir>\target\classes
Instrumenting classes for coverage ...
[delete] Deleting: C:\Projects\<dir>\cobertura.ser
[cobertura-instrument] Cobertura 18.104.22.168 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
[cobertura-instrument] Instrumenting 574 files
[cobertura-instrument] Cobertura: Saved information on 574 classes.
[cobertura-instrument] Instrument time: 15433ms
[cobertura-instrument] Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook
[cobertura-instrument] Picked up _JAVA_OPTIONS: -Xrunjvmhook -Xbootclasspath/a:C:\PROGRA~1\HP\QUICKT~1\bin\JAVA_S~1\classes;C:\PROGRA~1\HP\QUICKT~1\bin\JAVA_S~1\classes\jasmine.jar
Starting functional test phase ...
[groovyc] Compiling 1 source file to C:\Projects\<dir>\target\classes
[native2ascii] Converting 1 file from C:\Projects\<dir>\grails-app\i18n to C:\Documents and Settings\<name>\.grails\1.3.6\projects\<dir>\resources\grails-app\i18n
[delete] Deleting directory C:\Documents and Settings\<name>\.grails\1.3.6\projects\<dir>\tomcat
Running Grails application..
Flushing results done
Cobertura: Loaded information on 574 classes.
Cobertura: Saved information on 574 classes.
Configuring Spring Security ...
Server running. Browse to http://localhost:8080/
[groovyc] Compiling 1 source file to C:\Projects\<dir>\target\test-classes\functional
3- Then I point my functional tests to http://qa-server (in the baseURL property) and execute the tests.
So my question: Do I really need all of "step 2"? I understand that I would IF I wanted to run the functional tests on my location copy of the grail project running in Tomcat. However, I want to test the QA Server to ensure the project was correctly deployed.
Is there a configuration where I can skip step 2? If so, do you have an example or link to a tutorial?