How LR HTML differs from URL recording

Source: Internet
Author: User

Recording recording options Here are two major classes of recording methods: 1. html-based script HTML-based scripts

The scripts that are recorded in this way are based on HTML, generating individual steps for each user action, which is easier to understand and maintain, and easier to handle. For normal browser applications, it is recommended to use HTML recording mode.

Generally speaking, if we are the B/s architecture of the standard using IE, we should use a script under Html-base. Containing explicit URLs only the way to record scripts, which are based on URL requests and do not have any back-and-forth content.

Select HTML Advanced, two script types appear

A script describing user actions (Web_link, Web_submit_form)
Each function in the script directly corresponds to an action of the virtual user, and the functions created are mainly URLs (Web_url), Link (web_link), image (Web_image), and form submission (Web_submit_form).

    基于解释用户行为的脚本,注重描述用户做了什么操作类似于QTP,脚本简洁,基于用户操作模拟,浅显易懂,并且自身就包含了对象检查过程,无需校验

A script containing explicit URLs only (Web_url, Web_submit_data)
All URLs, link, and image are handled uniformly using the Web_url function, which is handled with Web_submit_data when the form is submitted. The result is that the script is not as intuitive as the previous one, but it is easier to handle parameterization and association problems in the script if there are more similar types of links in the page.

    基于URL请求的脚本录制类型,这种方式不考虑用户的操作,只考虑客户端发送的请求,注重于实际上系统做了什么。
2. url-based script URL-based scripts

The script that is recorded in this way is based on the URL request. If we are a non-IE standard C/s architecture, we recommend using Url-base to record scripts so that we can ensure that no HTTP requests are missed.

This is the URL request based script recording method, we will record all HTTP requests, resulting in the script contains a large number of web_url () function use Web_custom_request only custom HTTP request rules, More suitable for binary processing in custom HTTP requests. Generate scripts in this manner all requests are generated by the web_custom_request () function.

For functions such as Web_link (), Web_submit _form (), you need support for the previous page, that is, you must first visit the http://127.0.0.1:1080/WebTours/page before you can click the Sign up Now button. If you are not on this page, you cannot click on the Sign http://127.0.0.1:1080/WebTours/button, including Web_submit _form () submission, and it must be on the page after clicking the Sign up Now button.

For Web_url (), Web_submit _data () functions do not need to be supported on the previous page, which means you can access HTTP://127.0.0.1:1080/WEBTOURS/LOGIN/P1 directly (equivalent to clicking Now), and can also be submitted on the current page.

Choice of two recording modes: Html-based Pros and Cons:

(1) The resource is removed from memory and downloaded during playback. So the script is smaller and easier to read.

(2) because there are fewer hard-coded scripts, only fewer dynamic values need to be correlated.

(3) You can insert a statement such as a picture check to check if the result is correct.

(4) Because HTML mode playback requires active parsing of the returned information, it may be more resource-intensive than other recording modes.

url-based Advantages and Disadvantages:

(1) applies to non-browser applications.

(2) record all requests and resources from sever, even crawl non-HTML applications, so more association is required, and the script looks quite complex.

In summary, choose which recording method can refer to the following scenarios:

(1) If the application is a Web application, the preferred is html-based recording mode;

(2) If the application is a non-Web application using the HTTP protocol, the url-based recording mode is preferred;

(3) If the Java applet is used in the Web application and there is communication between the applet and the server, the url-based recording mode is selected.

How LR HTML differs from URL recording

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.