Testing Ajax Web Application

Recording and Running the Webtest in Visual Studio seems easy now..(You can see creating the webtest in my previous posts).
It’s well and good if webtest doesn’t fail but what if webtest fails????
There are many reasons why the webtest fails but the most common one (or  i can say which i encountered frequently) is webtest containing the ajax controls or postback functionality fails.
             

The Reason being is that the Web test engine works at the HTTP layer, it does not directly simulate client-side scripting like JavaScript or ActiveX controls. Web tests are concerned with generating load on a server. As a result, client-side scripting that only affects the appearance of a Web page is not significant to the Web test. Client-side scripting that sets parameter values or results in additional HTTP requests (such as AJAX) does affect the load on the server and might require you to manually modify the Web test to simulate the scripting.
That means we need to modify some of the parameters in the webtest to make it to run properly.

How do We Do it??? Here goes the solution and it did work for me….

So i wanted to share this with u all hoping that it may help you. 🙂

So,Just open the window consisting of webtest in Visual Studio,expand the links(involving ajax) and there you can find the folder named Extraction Rules which has Extract Hidden Fields option.(This is where the problem lies).
If u r using Visual Studio 2008 Right Click and select Properties as shown below.

a

This Opens up a Properties window.In that Required field would be true by default.Change this Value to false.

b

 

Do this for all the Hidden files present in the web test.
But it’s the different case when  u r using vs 2005 as there is no Required option then just right click the Extract Hidden Files option and Delete the Extract Hidden Fields as shown.

c

 

That’s it! u r Done!!!! Now just Rerun the webtest after saving the changes made.Now your  Webtest should run properly without any errors.

Also we can use “Fiddler” tool  for this kind of webtests.Go through these links to know more about “Fiddler”.

http://www.fiddlertool.com/Fiddler/help/WebTest.asp

http://blogs.msdn.com/edglas/archive/2007/06/13/fiddler-2-drop-available-at-www-fiddler2-com.aspx

Hope this is useful!!!

Comments are most welcome 🙂

Advertisements

3 Comments »

  1. Swathi said

    Gud Job deepa…………..It’s really very useful for beginers like me.:)

  2. Thanks for that post,
    I want to learn in depth of testing from web tests …… to unit test and every other minute details in various testing frameworks.
    This post helped me to take initial steps.
    Also some suggestions please choose a wider theme for your blog.So that side area is not wasted and the size of images gets large and clear i am a specs guy so you are playing with my eyes.
    Please do posts on whatever you learn and know i really want to play with testing in depth.

  3. deepajonnala said

    Hey Thanx for ur suggestions!!! They really help me to improve.
    I changed the Theme as per ur request, this is the only theme which i feel better and a bit wider.
    Hope it looks good!!

RSS feed for comments on this post · TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: