Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » Testing webapplications with sessionids
Testing webapplications with sessionids [message #69015] Fri, 28 April 2006 11:46 Go to next message
No real name is currently offline No real nameFriend
Messages: 2
Registered: July 2009
Junior Member
Hello,

we are trying to use tptp for performance tests of our web application.
I can record the application and generate the sources for a junit test.
We are using a sessionid for authentification, which is send with each
http-request.

When playing back the recorded http requests, I need to retrieve the
sessionid from the HttpResponse after the login-request and to replace the
recorded sessionid of further request with the actual one.

My idee was to modifiy the generated java sources, but I did not find any
way to retrieve the sessionid from the http-response.

The following code is generated by tptp:
HttpResponse response = m_httpExecutor[nUser].execute(request);

But it is impossible to get the whole http response form the response
object.
If I set a breakpoint I can see my sessionid in the chararray backing
"response.contentType", but it is not accessible in the java code.

Does anyone have an idee how to solve this problem, or where to dig for
further informations?

Thanks,
Ingo
Re: Testing webapplications with sessionids [message #69122 is a reply to message #69015] Mon, 01 May 2006 16:06 Go to previous messageGo to next message
Paul Slauenwhite is currently offline Paul SlauenwhiteFriend
Messages: 975
Registered: July 2009
Senior Member
Hi Ingo,
There are defects here:

1) The executeRequest(HttpRequest) method in the generated JUnit test class
for a TPTP URL test does not return the HTTP response.

2) The org.eclipse.hyades.test.http.runner.HttpResponse class does not
expose the complete HTTP response. For example, session ID.

3) Document the org.eclipse.hyades.test.http.runner classes (e.g. JavaDoc
comments).


Can you open TPTP defects for these issues (Test.Execution.URLRunner
component)?

Paul
"Ingo Weichsel" <Ingo.Weichsel@AtosOrigin.com> wrote in message
news:0f8f10dc59e643a1b422b63a34b5f159$1@www.eclipse.org...
> Hello,
>
> we are trying to use tptp for performance tests of our web application.
> I can record the application and generate the sources for a junit test.
> We are using a sessionid for authentification, which is send with each
> http-request.
>
> When playing back the recorded http requests, I need to retrieve the
> sessionid from the HttpResponse after the login-request and to replace the
> recorded sessionid of further request with the actual one.
>
> My idee was to modifiy the generated java sources, but I did not find any
> way to retrieve the sessionid from the http-response.
>
> The following code is generated by tptp:
> HttpResponse response = m_httpExecutor[nUser].execute(request);
>
> But it is impossible to get the whole http response form the response
> object.
> If I set a breakpoint I can see my sessionid in the chararray backing
> "response.contentType", but it is not accessible in the java code.
>
> Does anyone have an idee how to solve this problem, or where to dig for
> further informations?
>
> Thanks,
> Ingo
>
>
>
>
Re: Testing webapplications with sessionids [message #69248 is a reply to message #69122] Mon, 01 May 2006 17:42 Go to previous messageGo to next message
Paul Slauenwhite is currently offline Paul SlauenwhiteFriend
Messages: 975
Registered: July 2009
Senior Member
Also,

4) The org.eclipse.hyades.test.http.runner.HttpRequest class does not
provide a setter for the session ID.

Paul

"Paul Slauenwhite" <paules@ca.ibm.com> wrote in message
news:e35bme$sn8$1@utils.eclipse.org...
> Hi Ingo,
> There are defects here:
>
> 1) The executeRequest(HttpRequest) method in the generated JUnit test
class
> for a TPTP URL test does not return the HTTP response.
>
> 2) The org.eclipse.hyades.test.http.runner.HttpResponse class does not
> expose the complete HTTP response. For example, session ID.
>
> 3) Document the org.eclipse.hyades.test.http.runner classes (e.g. JavaDoc
> comments).
>
>
> Can you open TPTP defects for these issues (Test.Execution.URLRunner
> component)?
>
> Paul
> "Ingo Weichsel" <Ingo.Weichsel@AtosOrigin.com> wrote in message
> news:0f8f10dc59e643a1b422b63a34b5f159$1@www.eclipse.org...
> > Hello,
> >
> > we are trying to use tptp for performance tests of our web application.
> > I can record the application and generate the sources for a junit test.
> > We are using a sessionid for authentification, which is send with each
> > http-request.
> >
> > When playing back the recorded http requests, I need to retrieve the
> > sessionid from the HttpResponse after the login-request and to replace
the
> > recorded sessionid of further request with the actual one.
> >
> > My idee was to modifiy the generated java sources, but I did not find
any
> > way to retrieve the sessionid from the http-response.
> >
> > The following code is generated by tptp:
> > HttpResponse response = m_httpExecutor[nUser].execute(request);
> >
> > But it is impossible to get the whole http response form the response
> > object.
> > If I set a breakpoint I can see my sessionid in the chararray backing
> > "response.contentType", but it is not accessible in the java code.
> >
> > Does anyone have an idee how to solve this problem, or where to dig for
> > further informations?
> >
> > Thanks,
> > Ingo
> >
> >
> >
> >
>
>
Re: Testing webapplications with sessionids [message #69328 is a reply to message #69248] Tue, 02 May 2006 15:17 Go to previous message
No real name is currently offline No real nameFriend
Messages: 2
Registered: July 2009
Junior Member
Hello,

I submitted the four defects as requested.

Ingo

Paul Slauenwhite wrote:

> Also,

> 4) The org.eclipse.hyades.test.http.runner.HttpRequest class does not
> provide a setter for the session ID.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=139709

Since the formular name for the session id is framework dependent, a
method to
define the name of the session id should be provided as well.
In our framework we send http-get-requests which are essentially set by:

request.setAbsolutePath("/~webtest1/cgi-bin/data.cgi?applId=myServer "
+ "&session=652213570&command=welcome&locale=de");

My first idea was to patch the generated sources by modifiying those
requests.
A generic way to do this or a way to configere the project to let the src
generator do this would be nice, but I do not really see a generic way to
do so...

> Paul

> "Paul Slauenwhite" <paules@ca.ibm.com> wrote in message
> news:e35bme$sn8$1@utils.eclipse.org...
>> Hi Ingo,
>> There are defects here:
>>
>> 1) The executeRequest(HttpRequest) method in the generated JUnit test
> class
>> for a TPTP URL test does not return the HTTP response.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=139696

>>
>> 2) The org.eclipse.hyades.test.http.runner.HttpResponse class does not
>> expose the complete HTTP response. For example, session ID.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=139699

>>
>> 3) Document the org.eclipse.hyades.test.http.runner classes (e.g. JavaDoc
>> comments).
https://bugs.eclipse.org/bugs/show_bug.cgi?id=139701

>>
>>
>> Can you open TPTP defects for these issues (Test.Execution.URLRunner
>> component)?
>>
>> Paul
>> "Ingo Weichsel" <Ingo.Weichsel@AtosOrigin.com> wrote in message
>> news:0f8f10dc59e643a1b422b63a34b5f159$1@www.eclipse.org...
>> > Hello,
>> >
>> > we are trying to use tptp for performance tests of our web application.
>> > I can record the application and generate the sources for a junit test.
>> > We are using a sessionid for authentification, which is send with each
>> > http-request.
>> >
>> > When playing back the recorded http requests, I need to retrieve the
>> > sessionid from the HttpResponse after the login-request and to replace
> the
>> > recorded sessionid of further request with the actual one.
>> >
>> > My idee was to modifiy the generated java sources, but I did not find
> any
>> > way to retrieve the sessionid from the http-response.
>> >
>> > The following code is generated by tptp:
>> > HttpResponse response = m_httpExecutor[nUser].execute(request);
>> >
>> > But it is impossible to get the whole http response form the response
>> > object.
>> > If I set a breakpoint I can see my sessionid in the chararray backing
>> > "response.contentType", but it is not accessible in the java code.
>> >
>> > Does anyone have an idee how to solve this problem, or where to dig for
>> > further informations?
>> >
>> > Thanks,
>> > Ingo
>> >
>> >
>> >
>> >
>>
>>
Previous Topic:Remote testing externally built code (native and java)
Next Topic:"No data is available for display" message
Goto Forum:
  


Current Time: Thu Apr 25 09:24:44 GMT 2024

Powered by FUDForum. Page generated in 0.04161 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top