[Webtest] Re: Cookies and Redirection

work webtest@lists.canoo.com
Tue, 16 May 2006 13:46:33 -0400


Thanks Marc, 

Unfortunately, I got this as a result: 

$ ../bin/webtest.sh -buildfile runtests.xml -Dfile.test.props=my.properties 
testSuitePart1
Will use /usr/java/jdk1.5.0_06/bin/java
Buildfile: runtests.xml
Trying to override old definition of task sleep 

clean:
  [delete] Deleting 4 files from 
/home/rick/dev/mystuff/canoo/ourtests/webtest-results 

performTestsPart1: 

 -chkRunTheTests: 

runTestsPart1: 

 -chkRunTheTests: 

runTestsPart1:
    [echo] Running Tests for : userid - password 

runTest: 

loginTests:
 [webtest]  INFO (com.canoo.webtest.ant.WebtestTask) - Canoo Webtest: 
R_1217.
  [config]  INFO (com.canoo.webtest.engine.Configuration) - Surfing with 
browser Mozilla/4.0 (compatible; MSIE 6.0b; Windows 98)
  [config]  INFO (com.canoo.webtest.engine.Configuration) - Configuring 1 
HTTP header field(s)
  [config]  INFO (com.canoo.webtest.engine.Configuration) - Configured 
header "followRedirects": true
  [config]  INFO (com.canoo.webtest.engine.Configuration) - set option 
<ThrowExceptionOnFailingStatusCode> to value <false>
[antWrapper]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: 
antWrapper "<unknown>" (1/13)
    [echo] Starting login.xml
  [invoke]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: invoke 
"Log In to Application" (2/13)
  [invoke]  INFO (com.canoo.webtest.steps.request.AbstractTargetAction) - -> 
gotoTarget by URL:
  [invoke]  INFO (com.canoo.webtest.steps.request.TargetHelper) - getting 
response for url: https://application.domain.com/apps
  [invoke]  INFO (com.canoo.webtest.steps.request.TargetHelper) - Using 
custom initializer: 
com.canoo.webtest.security.SunJsseBaseConnectionInitializer
  [invoke]  INFO 
(com.canoo.webtest.security.SunJsseBaseConnectionInitializer) - Installing 
HostnameVerifier
  [invoke]  INFO (org.apache.commons.httpclient.HttpMethodDirector) - 
Redirect requested but followRedirects is disabled
  [invoke]  INFO (org.apache.commons.httpclient.HttpMethodDirector) - 
Redirect requested but followRedirects is disabled
  [invoke]  INFO (org.apache.commons.httpclient.HttpMethodDirector) - 
Redirect requested but followRedirects is disabled
  [invoke]  INFO (com.canoo.webtest.engine.Context) - Content of window 
changed to 
https://signon.domain.com/signon/page/;jsessionid=C463E2F839057E2BAF03C34C86 
75CB5D?url=%2Fapps%2F
  [invoke]  INFO (com.canoo.webtest.engine.Context) - Content loaded in 
newly opened window, its content will become current response
  [invoke]  INFO (com.canoo.webtest.engine.Context) - Current form set to 
none
  [invoke]  INFO (com.canoo.webtest.engine.Context) - Current response now: 
https://signon.domain.com/signon/page/;jsessionid=C463E2F839057E2BAF03C34C86 
75CB5D?url=%2Fapps%2F
[antWrapper]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: 
antWrapper "<unknown>" (3/13)
    [echo] invoke step complete
[setInputField]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: 
setInputField "Enter the User Name" (4/13)
[setInputField]  INFO (com.canoo.webtest.engine.Context) - Current form set 
to (action=j_security_check)
[setInputField]  INFO (com.canoo.webtest.steps.form.AbstractSetFieldStep) - 
Found 1 suitable fields, considering only the first one
[antWrapper]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: 
antWrapper "<unknown>" (5/13)
    [echo] filled out j_username
[setInputField]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: 
setInputField "Enter the Password" (6/13)
[setInputField]  INFO (com.canoo.webtest.steps.form.AbstractSetFieldStep) - 
Found 1 suitable fields, considering only the first one
[antWrapper]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: 
antWrapper "<unknown>" (7/13)
    [echo] ********************************* filled out j_password
  [groovy]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: groovy 
"Change cookie policy to: ignore cookies" (8/13)
[clickButton]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: 
clickButton "Click the 'Log In' Button" (9/13)
[clickButton]  INFO (com.canoo.webtest.steps.request.AbstractTargetAction) - 
 -> gotoTarget by clickButton with name: null
[clickButton]  INFO (com.canoo.webtest.steps.request.ClickButton) - -> 
findTarget(by input): name= value=Log In
[clickButton]  INFO (org.apache.commons.httpclient.HttpMethodDirector) - 
Redirect requested but followRedirects is disabled
[clickButton]  WARN (org.apache.commons.httpclient.HttpMethodBase) - Cookie 
rejected: "JSESSIONID=CF14D71EDD1EC8B351F325AD7D5497E4". Illegal path 
attribute "/apps/". Path of origin: "/signon/page/"
[clickButton]  INFO (org.apache.commons.httpclient.HttpMethodDirector) - 
Redirect requested but followRedirects is disabled
[clickButton]  INFO (org.apache.commons.httpclient.HttpMethodDirector) - 
Redirect requested but followRedirects is disabled
[clickButton]  INFO (org.apache.commons.httpclient.HttpMethodDirector) - 
Redirect requested but followRedirects is disabled
[clickButton]  INFO (com.canoo.webtest.engine.Context) - Content of window 
changed to https://signon.domain.com/signon/page/?url=%2Fapps%2F
[clickButton]  INFO (com.canoo.webtest.engine.Context) - Content of current 
window changed, it will become current response
[clickButton]  INFO (com.canoo.webtest.engine.Context) - Current form set to 
none
[clickButton]  INFO (com.canoo.webtest.engine.Context) - Current response 
now: https://signon.domain.com/signon/page/?url=%2Fapps%2F
[storeCookie]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: 
storeCookie "storing session cookie" (10/13)
[antWrapper]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: 
antWrapper "<unknown>" (11/13)
    [echo] ********************************* Clicked Log In Button
[verifyText]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: 
verifyText "Main Menu Page - Or Bookmarked Page should be displayed" (12/13)
[verifyText]  INFO (com.canoo.webtest.steps.Step) - Running with: Canoo 
Webtest: R_1217.
[verifyText]  INFO (com.canoo.webtest.steps.Step) - Exception thrown from 
this class: com.canoo.webtest.engine.StepFailedException
[verifyText]  INFO (com.canoo.webtest.steps.Step) - Message was: 
Step[verifyText "Main Menu Page - Or Bookmarked Page should be displayed" 
(12/13)]: Text not found in page. Expected <Welcome,>
INFO (com.canoo.webtest.ant.WebtestTask) - Test report successfully created. 

BUILD FAILED
/home/rick/dev/mystuff/canoo/ourtests/runtests.xml:63: The following error 
occurred while executing this line:
/home/rick/dev/mystuff/canoo/ourtests/runtests.xml:46: The following error 
occurred while executing this line:
/home/rick/dev/mystuff/canoo/ourtests/runtests.xml:31: The following error 
occurred while executing this line:
/home/rick/dev/mystuff/canoo/ourtests/useCases/logintests.xml:44: Canoo 
Webtest: R_1217.
Test failed.
Test step verifyText 
(/home/rick/dev/mystuff/canoo/ourtests/modules/login.xml:35: )  named "Main 
Menu Page - Or Bookmarked Page should be displayed" failed with message 
"Step[verifyText "Main Menu Page - Or Bookmarked Page should be displayed" 
(12/13)]: Text not found in page. Expected <Welcome,>" 

Total time: 8 seconds
$