Forum Discussion
NMeyer
13 years agoOccasional Contributor
So, running the test suite through in debug mode, caused the stack trace to offer some additional information. It appears that my original assumption is correct, that due to the "Maintain Http session" option, logging out and then logging back in is causing issues. Here is the more complete stack trace that now includes a "caused by":
Mon Oct 14 10:22:50 EDT 2013:ERROR:org.apache.http.client.ClientProtocolException
org.apache.http.client.ClientProtocolException
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:822)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$Helper.execute(HttpClientSupport.java:246)
at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport.execute(HttpClientSupport.java:356)
at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.submitRequest(HttpClientRequestTransport.java:317)
at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.followRedirects(HttpClientRequestTransport.java:357)
at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:249)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:123)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.submitRequest(WsdlSubmit.java:76)
at com.eviware.soapui.impl.rest.RestRequest.submit(RestRequest.java:209)
at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequestStep.run(RestTestRequestStep.java:898)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:239)
at com.eviware.soapui.debug.DebugTestCaseRunner.runTestStep(SourceFile:50)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:48)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:148)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:43)
at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:135)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.http.client.CircularRedirectException: Circular redirect to 'http://xxxxx/yyyy/zzzzzz'
at org.apache.http.impl.client.DefaultRedirectStrategy.getLocationURI(DefaultRedirectStrategy.java:168)
at org.apache.http.impl.client.DefaultRedirectStrategy.getRedirect(DefaultRedirectStrategy.java:193)
at org.apache.http.impl.client.DefaultRequestDirector.handleResponse(DefaultRequestDirector.java:1021)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:482)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
... 22 more
So here is what is happening:
1) I'm calling http://www.myhomepage.com to get the homepage content
2) using information from this homepage call to then login with account A
3) while logged in with this account, making a call to api 1 and api 2
4) log out account A
5) call http://www.myhomepage.com to try and start a new session
At step 5 when the call to http://www.myhomepage.com is being called, it's being redirected to http://www.myhomepage.com/Home just like would happen in a browser if you were to navigate to http://www.myhomepage.com when you already had a session logged in. So, my question would be, with the "Maintain Http session" option checked globally for the Test Case, is it possible to have multiple logins and logouts? As another bit of information, the logout appears to work correctly. If I look at the "HTML" representation of the response of the logout call, it is correctly showing the login page.
Mon Oct 14 10:22:50 EDT 2013:ERROR:org.apache.http.client.ClientProtocolException
org.apache.http.client.ClientProtocolException
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:822)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$Helper.execute(HttpClientSupport.java:246)
at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport.execute(HttpClientSupport.java:356)
at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.submitRequest(HttpClientRequestTransport.java:317)
at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.followRedirects(HttpClientRequestTransport.java:357)
at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:249)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:123)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.submitRequest(WsdlSubmit.java:76)
at com.eviware.soapui.impl.rest.RestRequest.submit(RestRequest.java:209)
at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequestStep.run(RestTestRequestStep.java:898)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:239)
at com.eviware.soapui.debug.DebugTestCaseRunner.runTestStep(SourceFile:50)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:48)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:148)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:43)
at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:135)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.http.client.CircularRedirectException: Circular redirect to 'http://xxxxx/yyyy/zzzzzz'
at org.apache.http.impl.client.DefaultRedirectStrategy.getLocationURI(DefaultRedirectStrategy.java:168)
at org.apache.http.impl.client.DefaultRedirectStrategy.getRedirect(DefaultRedirectStrategy.java:193)
at org.apache.http.impl.client.DefaultRequestDirector.handleResponse(DefaultRequestDirector.java:1021)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:482)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
... 22 more
So here is what is happening:
1) I'm calling http://www.myhomepage.com to get the homepage content
2) using information from this homepage call to then login with account A
3) while logged in with this account, making a call to api 1 and api 2
4) log out account A
5) call http://www.myhomepage.com to try and start a new session
At step 5 when the call to http://www.myhomepage.com is being called, it's being redirected to http://www.myhomepage.com/Home just like would happen in a browser if you were to navigate to http://www.myhomepage.com when you already had a session logged in. So, my question would be, with the "Maintain Http session" option checked globally for the Test Case, is it possible to have multiple logins and logouts? As another bit of information, the logout appears to work correctly. If I look at the "HTML" representation of the response of the logout call, it is correctly showing the login page.