LoadRunner-When Discuznt met LoadRunner (on) (forwarded)

Source: Internet
Author: User

When Discuznt met the LoadRunner (on)

DISCUZNT3 official version has been released for some time, recently more than half a year to write about the product of the technical article, one is time, two is limited energy. However, after the release of the official version, there was some effort, and one of our business customers after upgrading from version 2.6 to the 3.0 official version, there was an episode that had to be returned to the 2.6 version. Because this customer's forum visits and posting volume is larger, usually online number 5000, daily posting volume of about 230,000. Therefore, some performance problems, in the case of large concurrency, the server response time-out, and at the peak of the more unstable. Before I used tinyget in the company to do some simple stress test, found some problems, but the reason is not obvious, so in the company meeting someone put forward to use Loadruner to do a stress test, to see how the performance of 3.0 products inverted bottom, what caused the user's server instability. So there's this article today.

Of course, the main purpose of my writing this article is to make a memorandum . The reason is very simple, is three years ago used for a period of time LR, thought this test will pro, can not think, even the simplest number of concurrent users forget where set up, so in view of this, only sense to do the record of ' necessity '. So the contents of this article both notes and actual combat in a, hehe. Well, crap less, let's go!

First, I'm going to build a test environment locally, and this test environment is a small internal network that includes a 1u server, a tplink switch, and a machine with LR installed. And why to do so, the reason is very simple, if the use of the company's local area network, the first is to be affected by the internal traffic flow and limit the limited flow of software, if there are one or two colleagues to open a What ' thunder ' Yes, ' donkey ' Yes, ' M ' Ah of the downloader, it is more lively, it is difficult to finally put the pressure and network traffic simulation, so I directly through network management to find the three devices, to become a 100m internal network, so that can fundamentally ensure that 1000 of concurrent users (V_user).

The statement here is that itself is loadruner8.0, and is cracked version. Oh, you have not read wrong, because I am very poor, do not have the financial resources to buy genuine lisence, so here is only ' that '. At the same time, in order to ensure the installation of LR normal operation, I directly installed it on the WINDOW2003+IE6 platform, which is the LR comparison standard system operating environment. After completing the installation and lisence registration, take a look at the usage process below.

First step: recording a script

Here is a procedure for recording a script:

Because the web app is being tested, select the HTTP protocol in the Create Project window.

Then fill in the following window with the HTTP link address to test the program, then click OK. LR then launches IE6 and accesses the app at the URL we set up earlier.

Here we can see the following events in the constant accumulation, these events we can be seen as a HTTP request processing operations (such as download js,css, pictures, etc.).

We then click on the "new action" icon of the recording tool to create a new action, which is to define each link in our testing process, so that we can see it at a glance when we analyze the results of the stress test, hehe.

In the new action, we define "Showforum" (that is, the section information is displayed) and then we click on a link to a forum section as follows:

Note: I am used to defining the name of the action as the name of the linked page , which is more intuitive.

Here we see events accumulating and changing. Then we create an action to record the operation of the topic, because our products support the popup function in 3.0, so we record the action as "Pop_posttopic", then we click on a "new post" button on the current Showforum page, So the posting page will be bounced out, such as:

Here you see, even the Ajax pop-up window, LR will be ' faithful ' to record.

Here we simply enter some information, and then create a new action called ' Posttopic ', that is, submit the topic , then we click the Publish button, so that the submission of the topic process is also recorded.

You will find that when the release is successful, the page jumps to showtopic. In other words ' posttopic ' This action contains commit and jump two operations, but it doesn't matter, when the test report comes out, we can see the action of the two actions of the Execution time, page volume and other information.

According to the General people to browse the forum's habit, it will be in different sections and topics ' tossing and turning ', so we will create an action, called 'showforum_2', to represent its jump section of the behavior, and then click on the Navigation link on the button, such as:

When the page jumps to the Showforum page, we then create an action, called showtopic_2, to open a new theme on behalf of the user. Then we'll just order a topic post. This basically completes a major operational process. Finally, we found the "Vuser_end" action in the drop-down box of the recording tool as the last action, usually I put the ' log out ' operation as the content of this action, and today I ' Jump back to the page ' as the "Vuser_end" The contents of this action.

This way, the recording tool is finished, and we click the Block icon on the Recording toolbar to end the recording, such as:

Let's take a look at the related scripts that LR generates for us. Such as:

Directly from the script, basically is the link in the content of the page that each action accesses , the script and the related file link information. This information is used by LR to perform related operations in turn.

We can then set the ' number of repetitions ' of the ' series of actions ' we have just made when we recorded the script, and we can set it by clicking on the toolbar icon on the LR, such as:

In the pop-up window, we can set the number of repetitions, and the setting in the figure is to repeat these actions 5 times .

Of course we can also set the interval after each action is completed, which we can understand to be: when we look at a post, will not open the page to jump or close, will certainly read the corresponding content before the ' follow-up '. However, to maximize the "pressure" on the server and the database, here is the default setting, which is to execute the next action immediately after an action is done, such as:

We can look at the execution of our script using the Operation icon on LR (note: Press F10 to step)

Note: checking the execution of the script is primarily for follow-up consideration, because some script recordings may be incorrect or not what we want, and we can modify it as appropriate .

Well, today's content is here first, in the following article, will be introduced if you set up concurrent users, and build save test results, and if the analysis test report, because all the work is to generate a copy as accurate as possible, objective ' Report ' so that we can quickly help identify ' system bottlenecks ' and focus on optimization.

Original link: http://www.cnblogs.com/daizhj/archive/2009/09/25/1573926.html

Author: Daizhj, the earthquake-generation army

Website: http://daizhj.cnblogs.com/

Category: discuz! NT, pressure test (LoadRunner) Tags: discuznt, loadrunner, pressure test

LoadRunner-When Discuznt met LoadRunner (on) (forwarded)

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.