Property changes on: /home/marc/EWorkspaceOS/grails-functional-tests ___________________________________________________________________ Name: svn:ignore + checkout target Index: /home/marc/EWorkspaceOS/grails-functional-tests/apps/HelloWorld/.classpath =================================================================== --- /home/marc/EWorkspaceOS/grails-functional-tests/apps/HelloWorld/.classpath (revision 6919) +++ /home/marc/EWorkspaceOS/grails-functional-tests/apps/HelloWorld/.classpath (working copy) @@ -12,73 +12,74 @@ + + + + + + + + + - - + - - - - - - - - + + - - - - + + - - - - - - - - + - - + + + + + + + + - - - - + + - - - - - - - - - - + + + - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + Index: /home/marc/EWorkspaceOS/grails-functional-tests/apps/HelloWorld/application.properties =================================================================== --- /home/marc/EWorkspaceOS/grails-functional-tests/apps/HelloWorld/application.properties (revision 6919) +++ /home/marc/EWorkspaceOS/grails-functional-tests/apps/HelloWorld/application.properties (working copy) @@ -1,6 +1,6 @@ #Do not edit app.grails.* properties, they may change automatically. DO NOT put application configuration in here, it is not the right place! -#Tue Feb 12 16:21:54 GMT 2008 +#Thu May 08 17:44:34 CEST 2008 app.version=0.1 app.servlet.version=2.4 -app.grails.version=1.0.1-SNAPSHOT +app.grails.version=1.0.3-SNAPSHOT app.name=HelloWorld Index: /home/marc/EWorkspaceOS/grails-functional-tests/apps/HelloWorld/grails-app/taglib/FooTagLib.groovy =================================================================== --- /home/marc/EWorkspaceOS/grails-functional-tests/apps/HelloWorld/grails-app/taglib/FooTagLib.groovy (revision 0) +++ /home/marc/EWorkspaceOS/grails-functional-tests/apps/HelloWorld/grails-app/taglib/FooTagLib.groovy (revision 0) @@ -0,0 +1,5 @@ +class FooTagLib { + def myTag = { attrs -> + out << "new output of myTag" + } +} Property changes on: /home/marc/EWorkspaceOS/grails-functional-tests/apps/HelloWorld/grails-app/taglib/FooTagLib.groovy ___________________________________________________________________ Name: svn:eol-style + native Name: svn:keywords + Author Date Id Revision Index: /home/marc/EWorkspaceOS/grails-functional-tests/apps/HelloWorld/web-app/tagUsage.gsp =================================================================== --- /home/marc/EWorkspaceOS/grails-functional-tests/apps/HelloWorld/web-app/tagUsage.gsp (revision 0) +++ /home/marc/EWorkspaceOS/grails-functional-tests/apps/HelloWorld/web-app/tagUsage.gsp (revision 0) @@ -0,0 +1,11 @@ + + +For taglib tests + + + +This is the result of <g:myTag/>: + + + + Property changes on: /home/marc/EWorkspaceOS/grails-functional-tests/apps/HelloWorld/web-app/tagUsage.gsp ___________________________________________________________________ Name: svn:eol-style + native Name: svn:keywords + Author Date Id Revision Index: /home/marc/EWorkspaceOS/grails-functional-tests/apps/HelloWorld/webtest/reports/WebTestResults.html =================================================================== --- /home/marc/EWorkspaceOS/grails-functional-tests/apps/HelloWorld/webtest/reports/WebTestResults.html (revision 6919) +++ /home/marc/EWorkspaceOS/grails-functional-tests/apps/HelloWorld/webtest/reports/WebTestResults.html (working copy) @@ -4,12 +4,12 @@ The HelloWorld Project - Test Result - - + +
-WebTest
The HelloWorld Project    Tests started at Wed Jan 30 20:06:02 GMT 2008
+WebTest
The HelloWorld Project    Tests started at Thu May 08 17:51:36 CEST 2008 - - + @@ -32,7 +34,7 @@ - + @@ -42,15 +44,17 @@ - - + - + @@ -55,7 +59,7 @@ - +
@@ -22,12 +22,14 @@
ok1100 -
+
ok150 +
x00x150 +
+
Sum 1 100 Sum 2 100 
ok2100 -
+
ok480 +
x00x120 +
+
o00o00
Sum 2 100 Sum 5 100 
@@ -69,7 +73,7 @@ -Sum 1 100  +Sum 3 100  Avg @@ -76,7 +80,7 @@     - 892 ms + 712 ms @@ -81,12 +85,14 @@ -0 - 11100 -
+0 - 1267 +
-1 - 300 +1 - 3133 +
+ 3 - 500 @@ -106,7 +112,7 @@

-Test Scenario Overview (896) +Test Scenario Overview (2174)

@@ -119,12 +125,18 @@ - + + +
1okHelloController index test2 / 2896100 -
+
1okHelloController index test2 / 2176281 +
2xTagLib reloading8 / 1341219 +
+
group Gets the page again and check new tag output
+

Expand/Collapse nested steps for all tests: show all nested steps in document hide all nested steps in document


@@ -129,9 +141,9 @@

-ok HelloController index test -

Test started at Wed Jan 30 20:06:02 GMT 2008, lasting 896 ms.
Source: : -
Base URL (used by invoke steps with a relative URL): http://localhost:8080/HelloWorld/ +ok HelloController index test +Test started at Thu May 08 17:51:36 CEST 2008, lasting 1762 ms.
Source: : +
Base URL (used by invoke steps with a relative URL): http://localhost:8084/HelloWorld/
@@ -139,10 +151,10 @@ +
  - 1okinvoke + 1okinvoke

-Resulting page
+Resulting page
@@ -150,11 +162,11 @@
-
8921759
  - 2okverifyText + 2okverifyText
@@ -164,9 +176,233 @@
+3 + + +

+Back to Test Report Overview +

+ +
+
+

+x TagLib reloading +

Test started at Thu May 08 17:51:38 CEST 2008, lasting 412 ms.
Source: : +
Base URL (used by invoke steps with a relative URL): http://localhost:8084/HelloWorld/ +
+

Expand/Collapse nested steps:show all nested steps in testspec  hide all nested steps in testspec

+ + + + + + + + + + + + + +
#ResultNameParameterDuration
  + 1 +
+Shows all substeps
okgroup +
Gets the page and check original tag output
+last result page of this group
+   + + + + + + + + + + + + + + +
#ResultNameParameterDuration
  + 1okinvoke +
+
+Resulting page
+
+ + + + +
urltagUsage.gsp
+
+
348
  + 2okverifyTitle +
+
+
+ + + + +
textFor taglib tests
+
+
3
  + 3okverifyText +
+
+
+ + + + +
textHello from myTag!
+
+
1
  + 4 +
+Shows all substeps
oknot +
+
+   + + + + + + + +
#ResultNameParameterDuration
  + 1xverifyText +
+
+
+ + + + +
textnew output of myTag
+
+
3
4
+
357
  + 2okgroovy +
modify the taglib
+
+ + + + +
nested textdef f = new File("grails-app/taglib/FooTagLib.groovy") +f.write '''class FooTagLib { + def myTag = { attrs -> + out << "new output of myTag" + } +} +'''
+
+
23
  + 3 +
+Shows all substeps
xgroup +
Gets the page again and check new tag output
+last result page of this group
+   + + + + + + + + + + + + + + + + +
#ResultNameParameterDuration
  + 1okinvoke +
+
+Resulting page
+
+ + + + +
urltagUsage.gsp
+
+
28
  + 2okverifyTitle +
+
+
+ + + + +
textFor taglib tests
+
+
0
  + 3x
+Error +
+Page
verifyText +
+
+
+ + + + +
textnew output of myTag
+
+
2
  + 4 +
+Shows all substeps
onot +
+
+   + + + + + + + +
#ResultNameParameterDuration
  + 1overifyText +
+
+
+ + + + +
textHello from myTag!
+
+
+   +
+
+   +
+
32
+

+Error +

+

Message

+

Step[verifyText (3/3)]: Text not found in page. Expected <new output of myTag>

+

Location

+

(line: 0)

Back to Test Report Overview

@@ -174,7 +410,7 @@
- +
Created using Canoo Webtest (R_1551). Report created at Wed Jan 30 20:06:03 GMT 2008WebTest is an Open Source project founded and hosted by CanooCreated using Canoo Webtest (R_1551). Report created at Thu May 08 17:51:39 CEST 2008WebTest is an Open Source project founded and hosted by Canoo
Index: /home/marc/EWorkspaceOS/grails-functional-tests/apps/HelloWorld/webtest/reports/WebTestResults.xml =================================================================== --- /home/marc/EWorkspaceOS/grails-functional-tests/apps/HelloWorld/webtest/reports/WebTestResults.xml (revision 6919) +++ /home/marc/EWorkspaceOS/grails-functional-tests/apps/HelloWorld/webtest/reports/WebTestResults.xml (working copy) @@ -1,7 +1,7 @@ - + @@ -9,10 +9,10 @@ - + - + @@ -21,17 +21,17 @@ - + - + - Bare character content found. Inserting parent element <body>. - Missing parent chain. Inserting proper parent <html> for element <body>. - Element <body> not closed properly. - Element <html> not closed properly. + Bare character content found. Inserting parent element <body>. + Missing parent chain. Inserting proper parent <html> for element <body>. + Element <body> not closed properly. + Element <html> not closed properly. @@ -38,9 +38,124 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: /home/marc/EWorkspaceOS/grails-functional-tests/apps/HelloWorld/webtest/tests/TagLibTest.groovy =================================================================== --- /home/marc/EWorkspaceOS/grails-functional-tests/apps/HelloWorld/webtest/tests/TagLibTest.groovy (revision 0) +++ /home/marc/EWorkspaceOS/grails-functional-tests/apps/HelloWorld/webtest/tests/TagLibTest.groovy (revision 0) @@ -0,0 +1,43 @@ +class HelloControllerTest extends grails.util.WebTest { + + // Unlike unit tests, functional tests are often sequence dependent. + // Specify that sequence here. + void suite() { + testHelloController() + // add tests for more operations here + } + + def testHelloController() { + def originalText = "Hello from myTag!" + def newText = "new output of myTag" + def f = new File("grails-app/taglib/FooTagLib.groovy") + def originalCode = f.text + def newCode = originalCode.replace(originalText, newText) + assert originalCode != newCode + + webtest('TagLib reloading') { + group(description: "Gets the page and check original tag output") { + invoke (url: 'tagUsage.gsp') + verifyTitle (text: 'For taglib tests') + verifyText text: "$originalText" + not { + verifyText text: "$newText" + } + } + // TODO: implement a doInWebTest facilities to avoid this stuff!!! + groovy description: "modify the taglib", """ +def f = new File("$f") +f.write '''$newCode''' +""" + group(description: "Gets the page again and check new tag output") { + invoke (url: 'tagUsage.gsp') + verifyTitle (text: 'For taglib tests') + verifyText text: "$newText" + not { + verifyText text: "$originalText" + } + } + + } + } +} \ No newline at end of file Property changes on: /home/marc/EWorkspaceOS/grails-functional-tests/apps/HelloWorld/webtest/tests/TagLibTest.groovy ___________________________________________________________________ Name: svn:eol-style + native Name: svn:keywords + Author Date Id Revision