LoadRunner Testing Ajax

Source: Internet
Author: User

What is AJAX ?

Ajax, shorthand for asynchronous JavaScript and XML, was a web development technique for creating Interac tive Web applications. The intent is to make Web pages feel more responsive by exchanging small amounts of data with the server behind the scenes , so and the entire Web page does not has the to is reloaded each time the user requests a change. This was meant to increase the Web page's interactivity, speed, and usability.

The Ajax technique uses a combination of:

    • XHTML (or HTML) and CSS, for marking up and styling information.
    • The DOM accessed with a Client-side scripting language, especially ECMAScript implementations such as JavaScript and JSCRI PT, to dynamically display and interact with the information presented.
    • The XMLHttpRequest object is used to exchange data asynchronously with the Web server. In some Ajax frameworks and in certain situations, an IFrame object are used instead of the XMLHttpRequest object to Exchan GE data with the Web server, and in other implementations, dynamically added <script> tags could be used.
    • XML is sometimes used as the format for transferring data between the server and client, although any format would work, in cluding preformatted HTML, plain text, JSON and even ebml. These files may is created dynamically by some form of server-side scripting.

Like DHTML, LAMP and SPA, Ajax isn't a technology in itself, but a term that refers to the use of a group of technologies .

Json

JavaScript Object Notation (JSON) is a lightweight format for representing

Objects and their state. Major technology providers, such as Yahoo WS

and Microsoft ASP. Chosen JSON for client-server data exchange

As an alternative to XML, because it can is parsed more easily than XML.

For example, JSON objects can is de-serialized by simply passing them to the JavaScript evalfunction.

LoadRunner supported by AJAX Frame

LoadRunner supports less AJAX frameworks, and the following is excerpted from http://www.wilsonmar.com/ajax_rec.htm:

HP has stated this they support these frameworks for AJAX functions:

      • Atlas 1.0.10920.0/asp.net AJAX (All controls) (developed using Visual Studio 2005). LoadRunner 9.10 supported the Atlas 2.0 version in Visual Studio 2005.
        • This is one generation behind the ASP. 3.5 AJAX AjaxControlToolkit shown on the their sample website. However, I had been able to use LoadRunner 9.51 to work with many MS AJAX 3.5 controls Even though some controls is not Being created during recording.
      • Scriptaculous 1.8-autocomplete, Reorder List, and Slider

HP advertises that Vugen supports these frameworks at the "engine level", implying that Vugen would create Web Click and Sc Ript LoadRunner functions, but not LoadRunner ' s AJAX specific functions:

      • Prototype 1.6
      • Google Web Toolkit (GWT) 1.4

I ' ve heard that additional licensing was needed for LoadRunner to support the Infragistics Library. What's the HP product code for this, if it exists???

LoadRunner of the AJAX function

LR9.0:

Vugen supports recording for the following ASP. NET AJAX controls:accordion, collapsible Panel, Rating, Reorder List, and Slider.

Function Name

Description

Ajax_accordion

Emulates a user extending or collapsing a menu.

Ajax_collapsiblepanel

Emulates a user collapsing or expanding sections on a Web page.

Ajax_rating

Emulates a user setting a value of a rating control.

Ajax_reorderlist

Emulates a user reordering elements in a list.

Ajax_slider

Emulates setting a value using a slider control.

LR9.5:

The supported frameworks for AJAX functions is:

? Atlas 1.0.10920.0/asp.net Ajax-all Controls

? Scriptaculous 1.8-autocomplete, Reorder List, and Slider

Vugen supports the following frameworks at the engine level. This implies

That Vugen would create standard Web Click and Script steps, but not AJAX

Specific functions:

? Prototype 1.6

? Google Web Toolkit (GWT) 1.4

Function Name

Description

Ajax_accordion

Emulates a user extending or collapsing a menu.

Ajax_autocomplete

Selects an item from a list based on the text entered in a field.

Ajax_collapsiblepanel

Emulates a user collapsing or expanding sections on a Web page.

Ajax_rating

Emulates a user setting a value of a rating control.

Ajax_reorderlist

Emulates a user reordering elements in a list.

Ajax_slider

Emulates setting a value using a slider control.

Ajax_tabs

Emulates use of Folder-style tabs in Atlas applications.

LoadRunner Test AJAX Examples of

Take ASP. NET AJAX online samples as an example:

Http://www.asp.net/AJAX/AjaxControlToolkit/Samples/Slider/Slider.aspx

Test the Slider,loadrunner to record the script and call the Ajax_slider function to handle the behavior of the slider control:

Web_browser ("Slider.aspx",

DESCRIPTION,

ACTION,

"Navigate=http://www.asp.net/ajax/ajaxcontroltoolkit/samples/slider/slider.aspx",

last);

Ajax_slider ("Slider",

DESCRIPTION,

"Framework=atlas",

"Id=ctl00_samplecontent_slider1",

ACTION,

"Useraction=setvalue",

"Value=100",

last);

Execution JavaScript the method

Using the Web_browser function, you can execute JavaScript statements by assigning values to the Evaljavascript property, such as accessing the DOM, and using the Evaljavascriptresultparam property to save the results of the statement execution to parameters:

Web_browser ("Keyid_get",

ACTION,

"Evaljavascript=document.getelementbyid (/" ctl00_samplecontent_slider1_boundcontrol/"). InnerText;",

"Evaljavascriptresultparam=strvalue",

last);

Lr_output_message (Lr_eval_string ("{strvalue}"));

LoadRunner Testing Ajax

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.