You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by MartinOShea <ap...@dsl.pipex.com> on 2009/09/23 21:07:55 UTC

Trying to connect to Tomcat application using JMeter

Hello

Perhaps someone can help me with this: I'm a complete novice with JMeter but
I'm trying to use it to connect to a web application deployed in Tomcat to
simulate a small number of users logging in and browsing a page.

The following link shows the test plan's HTTP defaults:
http://www.nabble.com/file/p25531256/Defaults.png 

This is followed by two requests:

The first of these is to log into my application and is shown below:

http://www.nabble.com/file/p25531256/Login.png 

And the second one is for the logged in user to perform a browse on a page:

http://www.nabble.com/file/p25531256/Browse.png 

This all seems straightforward enough but when I run the test plan, all I
seems to get in the JMeter log is a series of HTTP 404 messages indicating
that there is a communications problem somewhere. 

Looking in the Results Tree, I see the HTML of my application's login page
being returned for both the Login and Browse requests. 

But I don't understand why?

I have troed Login Configs at various levels but nothing changes.

Tomcat is running during the test and in the test plan, I also have a HTTP
Cookie Manager set to 'default'.

When my application runs under Tomcat in test via a browser, its URL is
http://localhost:8080/myDataSharer.

Thanks

Martin O'Shea.
-- 
View this message in context: http://www.nabble.com/Trying-to-connect-to-Tomcat-application-using-JMeter-tp25531256p25531256.html
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Trying to connect to Tomcat application using JMeter

Posted by MartinOShea <ap...@dsl.pipex.com>.
This is now resolved - thanks to Deepak Shetty.


MartinOShea wrote:
> 
> Hello
> 
> Perhaps someone can help me with this: I'm a complete novice with JMeter
> but I'm trying to use it to connect to a web application deployed in
> Apache Tomcat to simulate a small number of users logging in and browsing
> a page.
> 
> The following link shows the test plan's HTTP defaults:
>  http://www.nabble.com/file/p25531256/Defaults.png 
> 
> This is followed by two requests:
> 
> The first of these is to log into my application and is shown below:
> 
>  http://www.nabble.com/file/p25531256/Login.png 
> 
> And the second one is for the logged in user to perform a browse on a
> page:
> 
>  http://www.nabble.com/file/p25531256/Browse.png 
> 
> This all seems straightforward enough but when I run the test plan, all I
> seems to get in the JMeter log is a series of HTTP 404 messages indicating
> that there is a communications problem somewhere. 
> 
> Looking in the Results Tree, I see the HTML of my application's login page
> being returned for both the Login and Browse requests. 
> 
> But I don't understand why?
> 
> I have also tried Login Configs at various levels but nothing changes.
> 
> Tomcat is running during the test and in the test plan, I also have a HTTP
> Cookie Manager set to 'default'.
> 
> When my application runs under Tomcat in test via a browser, its URL is
> http://localhost:8080/myDataSharer.
> 
> My configuration is JMeter 2.3.4 using Tomcat 6.x on Windows XP Pro. My
> application is made up of JSPs and servlets and it does not require secure
> logging in - it simply uses default Tomcat authentication.
> 
> Thanks
> 
> Martin O'Shea.
> 

-- 
View this message in context: http://www.nabble.com/Trying-to-connect-to-Tomcat-application-using-JMeter-tp25531256p25551517.html
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Trying to connect to Tomcat application using JMeter

Posted by Deepak Shetty <sh...@gmail.com>.
Hi
change redirect automatically to follow redirects.
Then execute the steps and check View Results Tree and see that login is
successful (in whatever way your app indicates success)
Your browse is taking you to login because the server thinks you arent
logged in . This may be the case if your app is using url rewriting instead
of using cookies for session id(or your login was indeed unsuccessful)

and finally if it  still fails youll have to compare with what the browser
sends and receives
http://wiki.apache.org/jakarta-jmeter/DifferentBehaviour
Plenty of similar cases in the mail archives.

regards
deepak

On Wed, Sep 23, 2009 at 12:07 PM, MartinOShea <ap...@dsl.pipex.com> wrote:

>
> Hello
>
> Perhaps someone can help me with this: I'm a complete novice with JMeter
> but
> I'm trying to use it to connect to a web application deployed in Tomcat to
> simulate a small number of users logging in and browsing a page.
>
> The following link shows the test plan's HTTP defaults:
> http://www.nabble.com/file/p25531256/Defaults.png
>
> This is followed by two requests:
>
> The first of these is to log into my application and is shown below:
>
> http://www.nabble.com/file/p25531256/Login.png
>
> And the second one is for the logged in user to perform a browse on a page:
>
> http://www.nabble.com/file/p25531256/Browse.png
>
> This all seems straightforward enough but when I run the test plan, all I
> seems to get in the JMeter log is a series of HTTP 404 messages indicating
> that there is a communications problem somewhere.
>
> Looking in the Results Tree, I see the HTML of my application's login page
> being returned for both the Login and Browse requests.
>
> But I don't understand why?
>
> I have troed Login Configs at various levels but nothing changes.
>
> Tomcat is running during the test and in the test plan, I also have a HTTP
> Cookie Manager set to 'default'.
>
> When my application runs under Tomcat in test via a browser, its URL is
> http://localhost:8080/myDataSharer.
>
> Thanks
>
> Martin O'Shea.
> --
> View this message in context:
> http://www.nabble.com/Trying-to-connect-to-Tomcat-application-using-JMeter-tp25531256p25531256.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: Trying to connect to Tomcat application using JMeter

Posted by Deepak Shetty <sh...@gmail.com>.
hi
also if you are seeing 404 errors, you should be able to see the same in
view results tree . If you see them in view results tree, you should be able
to look at the request pane to see the url you are requesting things like a
space at the end (and check if it directly works on a browser ..)
regards
deepak

On Wed, Sep 23, 2009 at 12:07 PM, MartinOShea <ap...@dsl.pipex.com> wrote:

>
> Hello
>
> Perhaps someone can help me with this: I'm a complete novice with JMeter
> but
> I'm trying to use it to connect to a web application deployed in Tomcat to
> simulate a small number of users logging in and browsing a page.
>
> The following link shows the test plan's HTTP defaults:
> http://www.nabble.com/file/p25531256/Defaults.png
>
> This is followed by two requests:
>
> The first of these is to log into my application and is shown below:
>
> http://www.nabble.com/file/p25531256/Login.png
>
> And the second one is for the logged in user to perform a browse on a page:
>
> http://www.nabble.com/file/p25531256/Browse.png
>
> This all seems straightforward enough but when I run the test plan, all I
> seems to get in the JMeter log is a series of HTTP 404 messages indicating
> that there is a communications problem somewhere.
>
> Looking in the Results Tree, I see the HTML of my application's login page
> being returned for both the Login and Browse requests.
>
> But I don't understand why?
>
> I have troed Login Configs at various levels but nothing changes.
>
> Tomcat is running during the test and in the test plan, I also have a HTTP
> Cookie Manager set to 'default'.
>
> When my application runs under Tomcat in test via a browser, its URL is
> http://localhost:8080/myDataSharer.
>
> Thanks
>
> Martin O'Shea.
> --
> View this message in context:
> http://www.nabble.com/Trying-to-connect-to-Tomcat-application-using-JMeter-tp25531256p25531256.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>