Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > web stress ASPNET with JMeter

Reply
Thread Tools

web stress ASPNET with JMeter

 
 
martin carmichael
Guest
Posts: n/a
 
      08-23-2004
Hello,

I am wondering how aspnet developers do their web stress on ASPNET
apps
..
I would like to run mine with apache JMeter, a well-known open source
tool.
Unfortunately, it does not works well with ASPNET, I think maybe
because postback in the dotnet area are not the same as in the
html/java/cgi-bin traddition.

In the aspnet area, the page is postback to itself, with a lot of
viewstate events fired. it work well if you submit with a browser.
But with a stress tool, like JMeter, or OpenSTA, this is not a browser
that post a request page, but a piece of software, usually running in
its own thread.

It seems to me that something is missing there, as the debug trace is
different, depending if a page is posted from a browser, like this:

aspx.page Begin Init
aspx.page End Init 0,000082 0,000082
aspx.page Begin LoadViewState 0,000131 0,000049
aspx.page End LoadViewState 0,000348 0,000217
aspx.page Begin ProcessPostData 0,000414 0,000066
aspx.page End ProcessPostData 0,000749 0,000335
aspx.page Begin ProcessPostData Second Try 0,001026 0,000278
aspx.page End ProcessPostData Second Try 0,001090 0,000063
aspx.page Begin Raise ChangedEvents 0,001122 0,000033
aspx.page End Raise ChangedEvents 0,001159 0,000037
aspx.page Begin Raise PostBackEvent 0,001192 0,000032
aspx.page End Raise PostBackEvent 0,950161 0,948969
aspx.page Begin PreRender 0,950248 0,000087
aspx.page End PreRender 0,950302 0,000054
aspx.page Begin SaveViewState 0,951535 0,001233
aspx.page End SaveViewState 0,951710 0,000175
aspx.page Begin Render 0,951767 0,000057
aspx.page End Render 0,953222 0,001455

or if it posted from a stress tool, like JMeter, like this:

aspx.page Begin Init
aspx.page End Init 0,000091 0,000091
aspx.page Begin PreRender 0,000272 0,000181
aspx.page End PreRender 0,000360 0,000088
aspx.page Begin SaveViewState 0,001071 0,000711
aspx.page End SaveViewState 0,001221 0,000150
aspx.page Begin Render 0,001273 0,000053
aspx.page End Render 0,003051 0,001777

as we can see, many events are not processeed when the post is done
with JMeter.
Can someone explains why and tell us a workaround?

is it possible to replace asp:button events handling by input type
submit button ? How could I handle input type=submit events? aspnet
is not very well suited to do input submit handling, as it is geared
torwards asp:button events.

thank you,

BTW: How do you stress test your aspnet web apps with multiple users?
 
Reply With Quote
 
 
 
 
Scott Allen
Guest
Posts: n/a
 
      08-23-2004
Hi Martin:

We use Microsoft Application Center Test, I believe this only comes
with the Enterprise edition of Visual Studio.NET.

http://msdn.microsoft.com/library/de...actml_main.asp

--
Scott
http://www.OdeToCode.com

On 23 Aug 2004 06:38:28 -0700, http://www.velocityreviews.com/forums/(E-Mail Removed) (martin
carmichael) wrote:

>Hello,
>
>I am wondering how aspnet developers do their web stress on ASPNET
>apps
>.
>I would like to run mine with apache JMeter, a well-known open source
>tool.
>Unfortunately, it does not works well with ASPNET, I think maybe
>because postback in the dotnet area are not the same as in the
>html/java/cgi-bin traddition.
>
>In the aspnet area, the page is postback to itself, with a lot of
>viewstate events fired. it work well if you submit with a browser.
>But with a stress tool, like JMeter, or OpenSTA, this is not a browser
>that post a request page, but a piece of software, usually running in
>its own thread.
>
>It seems to me that something is missing there, as the debug trace is
>different, depending if a page is posted from a browser, like this:
>
>aspx.page Begin Init
>aspx.page End Init 0,000082 0,000082
>aspx.page Begin LoadViewState 0,000131 0,000049
>aspx.page End LoadViewState 0,000348 0,000217
>aspx.page Begin ProcessPostData 0,000414 0,000066
>aspx.page End ProcessPostData 0,000749 0,000335
>aspx.page Begin ProcessPostData Second Try 0,001026 0,000278
>aspx.page End ProcessPostData Second Try 0,001090 0,000063
>aspx.page Begin Raise ChangedEvents 0,001122 0,000033
>aspx.page End Raise ChangedEvents 0,001159 0,000037
>aspx.page Begin Raise PostBackEvent 0,001192 0,000032
>aspx.page End Raise PostBackEvent 0,950161 0,948969
>aspx.page Begin PreRender 0,950248 0,000087
>aspx.page End PreRender 0,950302 0,000054
>aspx.page Begin SaveViewState 0,951535 0,001233
>aspx.page End SaveViewState 0,951710 0,000175
>aspx.page Begin Render 0,951767 0,000057
>aspx.page End Render 0,953222 0,001455
>
>or if it posted from a stress tool, like JMeter, like this:
>
>aspx.page Begin Init
>aspx.page End Init 0,000091 0,000091
>aspx.page Begin PreRender 0,000272 0,000181
>aspx.page End PreRender 0,000360 0,000088
>aspx.page Begin SaveViewState 0,001071 0,000711
>aspx.page End SaveViewState 0,001221 0,000150
>aspx.page Begin Render 0,001273 0,000053
>aspx.page End Render 0,003051 0,001777
>
>as we can see, many events are not processeed when the post is done
>with JMeter.
>Can someone explains why and tell us a workaround?
>
>is it possible to replace asp:button events handling by input type
>submit button ? How could I handle input type=submit events? aspnet
>is not very well suited to do input submit handling, as it is geared
>torwards asp:button events.
>
>thank you,
>
>BTW: How do you stress test your aspnet web apps with multiple users?


 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      08-23-2004
I'm not familar with JMeter, but the challenge with .net pages, is the
postback must include the the viewstate from the render. the contents of the
viewstate is what identifies a postback as a postback. also if you use a
autopostback controls, these are driven by client script, so you must
emulate this in the stress tool, by filling is more hidden fields.


-- bruce (sqlwork.com)


"martin carmichael" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> Hello,
>
> I am wondering how aspnet developers do their web stress on ASPNET
> apps
> .
> I would like to run mine with apache JMeter, a well-known open source
> tool.
> Unfortunately, it does not works well with ASPNET, I think maybe
> because postback in the dotnet area are not the same as in the
> html/java/cgi-bin traddition.
>
> In the aspnet area, the page is postback to itself, with a lot of
> viewstate events fired. it work well if you submit with a browser.
> But with a stress tool, like JMeter, or OpenSTA, this is not a browser
> that post a request page, but a piece of software, usually running in
> its own thread.
>
> It seems to me that something is missing there, as the debug trace is
> different, depending if a page is posted from a browser, like this:
>
> aspx.page Begin Init
> aspx.page End Init 0,000082 0,000082
> aspx.page Begin LoadViewState 0,000131 0,000049
> aspx.page End LoadViewState 0,000348 0,000217
> aspx.page Begin ProcessPostData 0,000414 0,000066
> aspx.page End ProcessPostData 0,000749 0,000335
> aspx.page Begin ProcessPostData Second Try 0,001026 0,000278
> aspx.page End ProcessPostData Second Try 0,001090 0,000063
> aspx.page Begin Raise ChangedEvents 0,001122 0,000033
> aspx.page End Raise ChangedEvents 0,001159 0,000037
> aspx.page Begin Raise PostBackEvent 0,001192 0,000032
> aspx.page End Raise PostBackEvent 0,950161 0,948969
> aspx.page Begin PreRender 0,950248 0,000087
> aspx.page End PreRender 0,950302 0,000054
> aspx.page Begin SaveViewState 0,951535 0,001233
> aspx.page End SaveViewState 0,951710 0,000175
> aspx.page Begin Render 0,951767 0,000057
> aspx.page End Render 0,953222 0,001455
>
> or if it posted from a stress tool, like JMeter, like this:
>
> aspx.page Begin Init
> aspx.page End Init 0,000091 0,000091
> aspx.page Begin PreRender 0,000272 0,000181
> aspx.page End PreRender 0,000360 0,000088
> aspx.page Begin SaveViewState 0,001071 0,000711
> aspx.page End SaveViewState 0,001221 0,000150
> aspx.page Begin Render 0,001273 0,000053
> aspx.page End Render 0,003051 0,001777
>
> as we can see, many events are not processeed when the post is done
> with JMeter.
> Can someone explains why and tell us a workaround?
>
> is it possible to replace asp:button events handling by input type
> submit button ? How could I handle input type=submit events? aspnet
> is not very well suited to do input submit handling, as it is geared
> torwards asp:button events.
>
> thank you,
>
> BTW: How do you stress test your aspnet web apps with multiple users?



 
Reply With Quote
 
martin carmichael
Guest
Posts: n/a
 
      08-24-2004
Hi Scott,
I also have Microsoft Application Center Test, but I am not strong
with it.
it generates VBScript code when recording from browser activity.
So, inside the VBS code, the username/password is hardcoded for the
POST operation in the login page.
There are also properties to set the number do connections for test
load.
Do you know how to dynamically change hard coded user names according
to the thread?
that is if I want a 5 users test load, I would like 5 different
usernames and I do not know how to do this with Microsoft Application
Center Test.
thank you,



Scott Allen <bitmask@[nospam].fred.net> wrote in message news:<(E-Mail Removed)>. ..
> Hi Martin:
>
> We use Microsoft Application Center Test, I believe this only comes
> with the Enterprise edition of Visual Studio.NET.
>
> http://msdn.microsoft.com/library/de...actml_main.asp
>
> --
> Scott
> http://www.OdeToCode.com
>
> On 23 Aug 2004 06:38:28 -0700, (E-Mail Removed) (martin
> carmichael) wrote:
>
> >Hello,
> >
> >I am wondering how aspnet developers do their web stress on ASPNET
> >apps
> >.
> >I would like to run mine with apache JMeter, a well-known open source
> >tool.
> >Unfortunately, it does not works well with ASPNET, I think maybe
> >because postback in the dotnet area are not the same as in the
> >html/java/cgi-bin traddition.
> >
> >In the aspnet area, the page is postback to itself, with a lot of
> >viewstate events fired. it work well if you submit with a browser.
> >But with a stress tool, like JMeter, or OpenSTA, this is not a browser
> >that post a request page, but a piece of software, usually running in
> >its own thread.
> >
> >It seems to me that something is missing there, as the debug trace is
> >different, depending if a page is posted from a browser, like this:
> >
> >aspx.page Begin Init
> >aspx.page End Init 0,000082 0,000082
> >aspx.page Begin LoadViewState 0,000131 0,000049
> >aspx.page End LoadViewState 0,000348 0,000217
> >aspx.page Begin ProcessPostData 0,000414 0,000066
> >aspx.page End ProcessPostData 0,000749 0,000335
> >aspx.page Begin ProcessPostData Second Try 0,001026 0,000278
> >aspx.page End ProcessPostData Second Try 0,001090 0,000063
> >aspx.page Begin Raise ChangedEvents 0,001122 0,000033
> >aspx.page End Raise ChangedEvents 0,001159 0,000037
> >aspx.page Begin Raise PostBackEvent 0,001192 0,000032
> >aspx.page End Raise PostBackEvent 0,950161 0,948969
> >aspx.page Begin PreRender 0,950248 0,000087
> >aspx.page End PreRender 0,950302 0,000054
> >aspx.page Begin SaveViewState 0,951535 0,001233
> >aspx.page End SaveViewState 0,951710 0,000175
> >aspx.page Begin Render 0,951767 0,000057
> >aspx.page End Render 0,953222 0,001455
> >
> >or if it posted from a stress tool, like JMeter, like this:
> >
> >aspx.page Begin Init
> >aspx.page End Init 0,000091 0,000091
> >aspx.page Begin PreRender 0,000272 0,000181
> >aspx.page End PreRender 0,000360 0,000088
> >aspx.page Begin SaveViewState 0,001071 0,000711
> >aspx.page End SaveViewState 0,001221 0,000150
> >aspx.page Begin Render 0,001273 0,000053
> >aspx.page End Render 0,003051 0,001777
> >
> >as we can see, many events are not processeed when the post is done
> >with JMeter.
> >Can someone explains why and tell us a workaround?
> >
> >is it possible to replace asp:button events handling by input type
> >submit button ? How could I handle input type=submit events? aspnet
> >is not very well suited to do input submit handling, as it is geared
> >torwards asp:button events.
> >
> >thank you,
> >
> >BTW: How do you stress test your aspnet web apps with multiple users?

 
Reply With Quote
 
Scott Allen
Guest
Posts: n/a
 
      08-24-2004
Hi Martin:

I know we have (not me, unfortunately) created multiple users and user
groups in ACT in order to test with N different users.
http://msdn.microsoft.com/library/de...ml_nav_cug.asp

--
Scott
http://www.OdeToCode.com

On 24 Aug 2004 06:04:36 -0700, (E-Mail Removed) (martin
carmichael) wrote:

>Hi Scott,
>I also have Microsoft Application Center Test, but I am not strong
>with it.
>it generates VBScript code when recording from browser activity.
>So, inside the VBS code, the username/password is hardcoded for the
>POST operation in the login page.
>There are also properties to set the number do connections for test
>load.
>Do you know how to dynamically change hard coded user names according
>to the thread?
>that is if I want a 5 users test load, I would like 5 different
>usernames and I do not know how to do this with Microsoft Application
>Center Test.
>thank you,
>
>
>


 
Reply With Quote
 
pdam pdam is offline
Junior Member
Join Date: Jan 2011
Posts: 1
 
      01-10-2011
Hi Martin ,
I have been using Jmeter with ASP .Net for the last 6 months . It is svery much doaable . As pointed out you need soime BeanShell Scripting to get the Application Load Scripted .

First Step should be to use Jmeter Recorder . Start the recorder and point your browser to use a proxy IP/Host which is being used by Jmeter Proxy Recorder . Make sure that you have a Controller where you can redirect the recorded Samplers . Verify this against the Jmeter GUI .

Second Step : Parameterize your Application . This is the tricky part . .Net has some POSTBACK VARIABLES like __EVENTVALIDATION__ , __VIEWSTATE__ , etc which would appear are hidden controls . They are specific for a user session and hence you need to parameterize that

To you http Sampler add a Response PostProcessor . Drag and add it as a child of a sampler . Use a regex to extract the value of the hidden component and assign that to a variable . Then in your subsequent Sampler remove the hardcoded value and place something like ${viewstate} or ${eventvalidaation} .
Make sure that you use a DEBUG Sampler so that you can look at the script properties or Variables . Now replace all such variables and you should be good to start

Regex id="__EVENTVALIDATION" value="(.+?)"
RegexExtractor_template $1$


I am attaching a script using these concepts so that you have some examples . Hope it is useful
Attached Files
File Type: zip reporting.zip (19.4 KB, 159 views)
 
Reply With Quote
 
arumugham arumugham is offline
Junior Member
Join Date: Jun 2012
Location: Bangalore, India
Posts: 1
 
      06-12-2012
Hi Martin,

The way @pdam had mentioned is the exact way. You need to record the hidden field and postback variable first. I have found out an easier way to do instead of using jmeter recorder. you can use tools like filddler (http://fiddler2.com/fiddler2/). On postback all the variables that are to be passed can be easily listed. Check the screenshot http://www.freeimagehosting.net/r1pvn
Then you can follow the steps like @pdam has suggested. Extract those values with regular expression extractor and pass it as a variable to the required pages to be tested.
Hope it was helpful
 

Last edited by arumugham; 06-12-2012 at 05:41 AM..
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
JMeter session ID Mike Java 3 05-22-2012 06:28 AM
Improving Jmeter - Monitoring throw SNMP replayit@post.cz Java 1 01-18-2009 12:30 PM
how to stess test with jmeter on getting 200 ok response? Elhanan Java 0 08-03-2005 06:26 AM
Improving Jmeter - User Agent Switching for HTTP replayit@post.cz Java 0 01-28-2005 08:38 AM
Improving Jmeter - Implemeting Virtual IPs replayit@post.cz Java 0 01-27-2005 09:21 AM



Advertisments