LR 基础50问50答
上一篇 / 下一篇 2009-09-24 20:14:00 / 个人分类:LR/Jmeter 大类
Learn Basic Introduction & preliminaries of HP –LoadRunnerthrough FAQ’s:
Q. 1: What is the process of manual correlation in LoadRunner?
9n'R*T } z9W271416It
is the method adopted for capturing the dynamic data resulting from the
server responses & further reusing it in the script. It can be done
in two ways like:
1.Manual correlation
2. Auto Correlation
Eb {i7{X271416<<<<<< =================== >>>>>>
Q. 2: What is the Loadtestingprocess in LoadRunner?
j/IV7K-oU6Mi'd271416Step 1:Planning thetest:Involves
development of a clearly defined test plan to ensure that the newly
developed test scenarios are able to accomplish the load-testing
objectives.
&k8z E$@zS"]y271416Step 2:Creation of Vusers:Involves
creation of Vuser scripts which contain various tasks performed by
every Vuser, tasks performed by Vusers as a whole, and tasks measured
as transactions.
&PKYQ`[7S[:f271416Step 3:Creation of the scenarios:A
scenario describes the events that occur during a testing session. It
includes a list of machines, scripts, and Vusers that run during the
scenario. Scenarios are created by using LoadRunner Controller. We can
create manual scenarios as well as goal-oriented scenarios. In manual
scenarios, we define the number of Vusers, the load generator machines,
and percentage of Vusers to be assigned to each script. Forwebtests,
we may create a goal-oriented scenario where we define the goal that
our test has to achieve. LoadRunner automatically builds a scenario for
us.
hA5aQs/O7Wp w v271416Step 4:Running the scenario:The
load on the server is emulated by instructing multiple Vusers to
perform. the tasks simultaneously. Before the testing, we set the
scenario configuration and scheduling. We can run the entire scenario,
Vuser groups, or individual Vusers.
km6eSAn-u2g271416Step 5: Monitoring the scenario:Scenario
execution is monitored using the LoadRunner online runtime,
transaction, system resource, Web resource, Web server resource, Web
application server resource, database server resource, network delay,
streaming media resource, firewall server resource, ERP server
resource, andJavaperformance monitors.
Step 6:Analyzing test results:During
scenario execution, LoadRunner records the performance of the
application under different loads. We use LoadRunner's graphs and
reports to analyze the application's performance.
<<<<<< =================== >>>>>>
Q. 3 : When load and performance Testing are done?
b x%{n2k` |R+@B271416Load testing is performed after the completion of interface (GUI) testing.
Single
user testing focuses on functionality and user interface of a system
component, while application testing focuses on performance and
reliability of an entire system.
For
example, a typical application-testing scenario might depict 1000 users
logging in simultaneously to a system. This gives rise to issues such
as what is the response time of the system, does it crash, will it go
with different software applications and platforms, can it hold so many
hundreds and thousands of users, etc.
"c/i;F o}3nc271416<<<<<< =================== >>>>>>
Q. 4: What are the components of LoadRunner?
The
components of LoadRunner are The Virtual User Generator, Controller,
and the Agent process, LoadRunner Analysis and Monitoring, LoadRunner
Books Online.
5\d%M-t$BCg271416<<<<<< =================== >>>>>>
Q. 5: What Component of LoadRunner are used for recording a Script?
Virtual
User Generator (VuGen) component is used to record a script. It enables
you to develop Vuser scripts for a variety of application types and
communication protocols.
<<<<<< =================== >>>>>>
Q. 6: What is a rendezvous point LoadRunner?
Rendezvous points are inserted into Vuser scripts to emulate heavy user load on the server.
Rendezvous
points instruct Vusers to wait during test execution for multiple
Vusers to arrive at a certain point, in order that they may
simultaneously perform. a task. For example, to emulate peak load on
the bank server, you can insert a rendezvous point instructing 100
Vusers to deposit cash into their accounts at the same time.
<<<<<< =================== >>>>>>
Q. 7: What Component of LoadRunner are used to play Back the script. in multi user mode?
"Gy)Y5|3RE271416Controller
component is used to playback the script. in multi-user mode. This is
done during a scenario run where a vuser script. is executed by a
number of vusers in a group.
<<<<<< =================== >>>>>>
Q. 8: What is a scenario in LoadRunner?
A
scenario defines the events that occur during each testing session. For
example, a scenario defines and controls the number of users to
emulate, the actions to be performed, and the machines on which the
virtual users run their emulations.
(M1RK/T6}$?6O p/p271416<<<<<< =================== >>>>>>
Q. 9 : What is the recording mode for web Vuser script. in LoadRunner?
We
use VuGen to develop a Vuser script. by recording a user performing
typical business processes on a client application. VuGen creates the
script. by recording the activity between the client and the server.
q"K sX:ewG%lN-G271416For
example, in web based applications, VuGen monitors the client end of
the database and traces all the requests sent to, and received from,
the database server. We use VuGen to: Monitor the communication between
the application and the server; Generate the required function calls;
and Insert the generated function calls into a Vuser script.
<<<<<< =================== >>>>>>
Q. 10: Why do we create parameters in LoadRunner?
Parameters
are like script. variables. They are used to vary input to the server
and to emulate real users. Different sets of data are sent to the
server each time the script. is run. Better simulate the usage model
for more accurate testing from the Controller; one script. can emulate
many different users on the system.
Q. 11: What is a correlation in LoadRunner?
Correlation
is used to obtain data which are unique for each run of the script. and
which are generated by nested queries. Correlation provides the value
to avoid errors arising out of duplicate values and also optimizing the
code (to avoid nested queries).
z&@#e#N RZ*Q271416Corelations are of two types like :
1)
Automatic correlation iinvolves setting of some rules for
thecorrelation. It can be application server specific. Here values are
replaced by data which are created by these rules.
2) Manual correlation, the value we want to correlate is scanned and create correlation is used to correlate.
<<<<<< =================== >>>>>>
Q. 12: How can we find out as to where correlation is required in LoadRunner?
There are two ways to find out the place of use of corelation
1)
We can scan for correlations, and see the list of values which can be
correlated. From this we can pick a value to be correlated.
g/S,e3Xba(n2714162) We can record two scripts and compare them.
<<<<<< =================== >>>>>>
Q. 13: Where can we set automatic correlation options in LoadRunner?
L&G@qp271416We
can set the automatic correlation from web point of view in recording
options and correlation tab. Here we can enable correlation for the
entire script. and choose either issue online messages or offline
actions, where we can define rules for that correlation.
4tg E,S$p3eF?6S(D{271416Automatic
correlation for database can be done using show output window and scan
for correlation and picking the correlate query tab and choose which
query value we want to correlate. If we know the specific value to be
correlated, we just do create correlation for the value and specify how
the value to be created.
<<<<<< =================== >>>>>>
Q. 14: What is the function to capture dynamic values in the web Vuser script. in LoadRunner?
MA+ml(k,]Lf#U G271416Web_reg_save_param function saves dynamic data information to a parameter.
R/yr"O)kYn `,sZ'L271416<<<<<< =================== >>>>>>
Q. 15: When do you disable log in Virtual User Generator in LoadRunner?
zW/[0C E4g z271416Once
we debug our script. and verify that it is functional, we can enable
logging for errors only. When we add a script. to a scenario, logging
is automatically disabled.
<<<<<< =================== >>>>>>
Q. 16: When do we use standard and extended logs in LoadRunner?
f6[d/Yi271416Standard Log Option: It creates a standard log of functions and messages sent during script. execution to use for debugging.
6Ysp6a:D271416It
is suggested to disable this option for large load testing scenarios.
When you copy a script. to a scenario, logging is automatically
disabled.
Extended
Log Option: Is selected to create an extended log, including warnings
and other messages. We can specify all additional information that
needs to be added to the extended log.
B'N0mgT6@.T `%E271416<<<<<< =================== >>>>>>
Q. 17: How do we debug a script. in LoadRunner?
VuGen contains two options to help debug Vuser scripts-the Run Step by Step command and breakpoints.
The
Debug settings in the Options dialog box allow us to determine the
extent of the trace to be performed during scenario execution.
2cW UD5pd n|/GMd271416The
debug information is written to the Output window. We can manually set
the message class within our script. using the lr_set_debug_message
function. This is useful if we want to receive debug information about
a small section of the script. only.
<<<<<< =================== >>>>>>
Q. 18:How do we write user defined functions in LoadRunner?
!V?Yg!eI271416Before
we create the User Defined functions we need to create the external
library (DLL) with the function. We add this library to VuGen bin
directory. Once the library is added then we assign user defined
function as a parameter.
L.o|$E1r{271416The
function should have the following format: __declspec (dllexport) char*
(char*, char). Few examples of user defined functions are GetVersion,
GetCurrentTime, GetPltform. etc.
"I{/\$m%eiW:H oj271416<<<<<< =================== >>>>>>
Q. 19: What are the changes possible to be made in run-time settings in LoadRunner?
The Run Time Settings are:
cw#hQ$kaQlv271416a) Pacing - Has iteration count.
b) Log - Needs to Disable the Logging Standard Log
K[4Dq]2T"D271416c) Extended Think Time - In think time there are two options like Ignore think time and Replay think time.
\ sV$i6zg271416d) General - Under general tab we can set the vusers as process or as multithreading and each step as a transaction.
<<<<<< =================== >>>>>>
Q. 20: Where do we set Iterations for Vuser testing in LoadRunner?
Iterations
are set in the Run Time Settings of the VuGen. The navigation for this
is Run time settings, Pacing tab, set number of iterations.
Q. 21: How do we perform. functional testing under load?
Functionality
under load can be tested by running several Vusers concurrently. By
increasing the amount of Vusers, we can determine how much load the
server can sustain.
*eO4si8U0`C271416<<<<<< =================== >>>>>>
Q. 22: What is Ramp up in LoadRunner?
k tSv[%p271416It
is an option is used to gradually increase the amount of Vusers/load on
the server. An initial value is set and a value to wait between
intervals can be specified. To set Ramp Up, go to 'Scenario Scheduling
Options'
<<<<<< =================== >>>>>>
5^9Bt_]J5h,V1[271416Q. 23: What are the advantages of running the Vuser as thread in LoadRunner?
$QR.T0C*g%@Q R r271416VuGen
provides the facility to use multithreading. This enables more Vusers
to be run per generator. If the Vuser is run as a process, the same
driver program is loaded into memory for each Vuser, thus taking up a
large amount of memory.
This
limits the number of Vusers that can be run on a single generator. If
the Vuser is run as a thread, only one instance of the driver program
is loaded into memory for the given number of Vusers (say 100).
6w1gf}4w(\&DWIp,Y271416Each thread shares the memory of the parent driver program, thus enabling more Vusers to be run per generator.
oR2f-[ hM8C-K271416<<<<<< =================== >>>>>>
Q. 24: How can we stop the execution of script. when an error occurs?
The
lr_abort function aborts the execution of a Vuser script. It instructs
the Vuser to stop executing the Actions section, executes the vuser_end
section and terminates the execution.
w?*sl,q1dN271416This
function is useful when you need to manually abort a script. execution
as a result of a specific error condition. When you terminate a script.
using this function, the Vuser is assigned the status "Stopped". For
this to take effect, we have to first uncheck the "Continue on error"
option in Run-Time Settings.
<<<<<< =================== >>>>>>
Q. 25: What is the relation between Response Time and Throughput?
The Throughput graph shows the amount of data in bytes that the Vusers received from the server in a second.
When
we compare this with the transaction response time, we will notice that
as throughput decreased, the response time also decreased. Similarly,
the peak throughput and highest response time would occur approximately
at the same time.
<<<<<< =================== >>>>>>
Q. 26: What is the Configuration of systems in relation to the LoadRunner?
The configuration of our systems refers to that of the client machines on which we run the Vusers.
Pt_9`"jx(a\ q X271416The
configuration of any client machine includes its hardware settings,
memory, operating system, software applications, development tools, etc.
9}-W d$yzG1M/? D271416This
system component configuration should match with the overall system
configuration that would include the network infrastructure, the web
server, the database server, and any other components that go with this
larger system so as to achieve the load testing objectives.
hW7T%u H"R X5T271416<<<<<< =================== >>>>>>
Q. 27: How do we identify the performance bottlenecks in LoadRunner?
Performance
Bottlenecks can be detected by using monitors. These monitors might be
application server monitors, web server monitors, database server
monitors and network monitors. They help in finding out the troubled
area in our scenario which causes increased response time.
The measurements made are usually performance response time, throughput, hits/sec, network delay graphs, etc.
<<<<<< =================== >>>>>>
Q. 28: How can we find out the web server related issues?
Using
Web resource monitors we can find the performance of web servers. Using
these monitors we can analyze throughput on the web server, number of
hits per second that occurred during scenario, the number of http
responses per second, the number of downloaded pages per second.
? lS~S dtd*F271416<<<<<< =================== >>>>>>
Q. 29: How can we find out the database related issues?
8gA/T S3Kw? hB{W.z271416By running "Database" monitor and help of "Data Resource Graph" we can find database related issues.
&K9P$km'hh&Gf271416<<<<<< =================== >>>>>>
Q. 30: How do we plan the Load in LoadRunner?
0p-op(` c^271416Load
test is planned to decide the number of users, what kind of machines we
are going to use and from where they are run. It is based on 2
important documents, Task Distribution Diagram and Transaction profile.
Task
Distribution Diagram gives us the information on number of users for a
particular transaction and the time of the load. The peak usage and
off-usage are decided from this Diagram. Transaction profile gives us
the information about the transactions name and their priority levels
with regard to the scenario we are deciding.
Q. 31: What is the purpose of vuser_init action in LoadRunner?
]]:ks3l3L*f271416Vuser_init action contains details of procedures to login to a server.
<<<<<< =================== >>>>>>
Q. 32: What is the purpose of vuser_end action in LoadRunner?
Q'T-l)yR6_`E271416Vuser_end section contains details of log off procedures.
YB)iUSg271416<<<<<< =================== >>>>>>
Q. 33: What is think time in LoadRunner?
It is the time that a real user waits between two actions.
Jl.u,X%_AVD271416For
example: When a user receives data from a server, he may need to wait
for some time may be several seconds to review the data before
responding. This time delay is known as the think time.
<<<<<< =================== >>>>>>
Q. 34: What is think time threshold in LoadRunner
JT^-Z;A(s271416Threshold
level is the level below which the recorded think time will be ignored.
The default value is five (5) seconds. We can change the think time
threshold in the Recording options of the Vugen.
~n7Y'N0l/E r0h3s271416<<<<<< =================== >>>>>>
| L[JG8pr+\271416Q. 35: What is the difference between standard log and extended log in LoadRunner?
v_ t7z0}B(w Jl/u271416The
standard log sends a subset of functions and messages sent during
script. execution to a log. The subset depends on the Vuser type.
0N/wNI\w@}271416Extended
log sends a detailed script. execution messages to the output log. This
is mainly used during debugging when we want information about
parameter substitution, data returned by the server & advanced
trace.
<<<<<< =================== >>>>>>
Q. 36: What is the purpose of lr_debug_message in LoadRunner?
0x'za#J.UL$i7p271416The lr_debug_message function sends a debug message to the output log when the specified message class is set.
N8m c2{%G p&`N:x3k/x271416<<<<<< =================== >>>>>>
Q. 37: What is the purpose of lr_output_message in LoadRunner?
c |IY&\S%C0oY1`271416The lr_output_message function sends notifications to the Controller Output window and the Vuser log file.
I-tz"k:L7^*E271416
!taJIg9kO6k271416<<<<<< =================== >>>>>>
Q. 38: What is the purpose of lr_error_message in LoadRunner?
The lr_error_message function sends an error message to the LoadRunner Output window.
S pc-FBap7E?J271416<<<<<< =================== >>>>>>
Q. 39: What is the purpose of lrd_stmt in LoadRunner?
.Q UEa&A wX4P;i271416The lrd_stmt function associates a character string (usually aSQLstatement) with a cursor. This function sets a SQL statement to be processed.
2M @N&eMcp271416<<<<<< =================== >>>>>>
Q. 40: What is the purpose of lrd_fetch in LoadRunner?
The lrd_fetch function fetches the next row from the result set.
Q. 41: Waht are the various types of goals in a goal oriented scenario in LoadRunner?
Load Runner provides five different types of goals in a goal oriented scenario:
3PJ6y\7A2714161) The number of concurrent Vusers
2) The number of hits per second
3) The number of transactions per second
4) The number of pages per minute
5) The transaction response time that you want your scenario
;F+m Vg(h.z*B271416<<<<<< =================== >>>>>>
Q. 42: Where do we set automatic correlation options in LoadRunner?
Automatic
correlation from web point of view, can be set in recording options and
correlation tab. Here we can enable correlation for the entire script.
and choose either issue online messages or offline actions, where we
can define rules for that correlation.
Automatic
correlation for database, can be done using show output window and scan
for correlation and picking the correlate query tab and choose which
query value we want to correlate. If we know the specific value to be
correlated, we just do create correlation for the value and specify how
the value to be created.
v#H5} [-N271416<<<<<< =================== >>>>>>
/Oqe%b9wt;Co271416Q. 43: How can we capture dynamic values in the web vuser script. in LoadRunner?
9Sbp s)X1rzX271416Web_reg_save_param function saves dynamic data information to a parameter.
W"Z?-E+S~ th*O7^(^%\271416<<<<<< =================== >>>>>>
'`S jqJ(S9Z271416Q. 44: How do we use the recording mode for web Vuser script. in LoadRunner?
We
use VuGen to develop a Vuser script. by recording a user performing
typical business processes on a client application. VuGen creates the
script. by recording the activity between the client and the server.
For
example, in web based applications, VuGen monitors the client end of
the database and traces all the requests sent to, and received from,
the database server. We use VuGen to: Monitor the communication between
the application and the server; Generate the required function calls;
and Insert the generated function calls into a Vuser script.
w J*f3eK,s271416<<<<<< =================== >>>>>>
Q. 45: What is the use of parameters in LoadRunner?
:bF:qP"ClL#k271416Parameters are like script. variables. These are used to vary input to the server and to emulate real users.
LaNdKF w271416Different
sets of data are sent to the server each time the script. is run. It is
better to simulate the usage model for more accurate testing from the
Controller where one script. can emulate many different users on the
system.51Testing软件测试网3vOBv6@
F S5H+@9KG r271416<<<<<< =================== >>>>>>
9X}+cOz wLxx271416Q. 46: For load testing, what you should know in addition to the knowldege of LoadRunner tool?
1) Management aspects of Load Testing especially the Planning.
5eMQ-v.|2714162) Requirements gathering, Profile/Mix,
3) Broad understanding of the protocol we need to work with.
(T$AI4[:y;l%]2714164) Basic knowledge of C programming.
EoA:fx3Vf5f2l271416<<<<<< =================== >>>>>>
Q. 47: How many users can we emulate with Load-Runner on a PC?
:qU8P8?A(q:[+c271416There
is no limi
TAG:
- 引用 删除 iseedeadpeople / 2009-09-24 20:15:45
- 翻译过来还真麻烦
一个在生涯旅途上的·QA
我的栏目
标题搜索
日历
|
|||||||||
日 | 一 | 二 | 三 | 四 | 五 | 六 | |||
1 | 2 | 3 | 4 | ||||||
5 | 6 | 7 | 8 | 9 | 10 | 11 | |||
12 | 13 | 14 | 15 | 16 | 17 | 18 | |||
19 | 20 | 21 | 22 | 23 | 24 | 25 | |||
26 | 27 | 28 | 29 | 30 | 31 |
我的存档
数据统计
- 访问量: 330617
- 日志数: 369
- 建立时间: 2009-09-23
- 更新时间: 2015-03-12