QUESTIONS ON PERFORMANCE TESTING
Q1. Why Performance Testing is performed?
Performance Testing is performed to evaluate application performance under some load and stress condition. It is generally measured in terms of response time for the user activity. It is designed to test the whole performance of the system at high load and stress condition.
Example: Customer like to withdraw money from an ATM counter, customer inserts debit or credit card and wait for the response. If system takes more than 5 min. then according to requirements system functioning is fail.
Type of Performance Testing:
Load: analogous to volume testing and determine how application deal with large amount of data.
Stress: examine application behavior under peak bursts of activity.
Capacity: measure overall capacity and determine at what time response time become unacceptable
Q2. What are tools of performance testing?
Following are some popular commercial testing tools are:
LoadRunner(HP): this for web and other application. It provides a variety of application environments, platforms and database. Number of server monitors to evaluate the performance measurement of each component and tracking of bottlenecks.
QAload(Compuware): used for load testing of web, database and char-based system.
WebLoad(RadView): it allows comparing of running test vs. test metrics.
Rational Performance Tester (IBM): used to identify presence and cause of system performance bottlenecks.
Silk Performer (Borland): allow prediction of behavior of e-business environment before it is deployed, regardless of size and complexity.
Q3. Explain the sub-genres of Performance testing.
Following are the sub-genres of Performance Testing:
Load Testing: it is conducted to examine the performance of application for a specific expected load. Load can be increased by increasing the number of user performing a specific task on the application in a specific time period.
Stress Testing: is conducted to evaluate a system performance by increasing the number of user more than the limits of its specified requirements. It is performed to understand at which level application crash.
Volume Testing: test an application in order to determine how much amount of data it can handle efficiently and effectively.
Spike Testing: what changes happens on the application when suddenly large number of user increased or decreased.
Soak Testing: is performed to understand the application behavior when we apply load for a long period of time what happens on the stability and response time of application.
Q4.What is performance tuning?
To improve the system performance we follow a mechanism, known as Performance tuning. To improve the systems performance there are two types of tuning performed:
Hardware tuning: Optimizing, adding or replacing the hardware components of the system and changes in the infrastructure level to improve the systems performance is called hardware tuning.
Software tuning: Identifying the software level bottlenecks by profiling the code, database etc. Fine tuning or modifying the software to fix the bottlenecks is called software tuning.
Q5. What is concurrent user hits in load testing?
When the multiple users, without any time difference, hits on a same event of the application under the load test is called a concurrent user hit. The concurrency point is added so that multiple Virtual User can work on a single event of the application. By adding concurrency point, the virtual users will wait for the other Virtual users which are running the scripts, if they reach early. When all the users reached to the concurrency point, only then they start hitting the requests.
Q6. What is the need for Performance testing?
Performance testing is needed to verify the below:
Response time of application for the intended number of users
Maximum load resisting capacity of application.
Capacity of application to handling the number of transactions.
Stability of application under expected and unexpected user load.
Ensuring that users have proper response time on production
Q7. What is the reason behind performing automated load testing?
Following drawbacks of manual Load Testing that leads to Automation load testing:
Difficult to measure the performance of the application accurately.
Difficult to do synchronization between the users.
Number of real time users are required to involve in Performance Testing
Difficult to analyze and identify the results & bottlenecks.
Increases the infrastructure cost
Q8. What are the exiting and entering criteria in the performance testing?
We can start the performance testing of application during the design. After the execution of the performance testing, we collected the results and analyzed them to improve the performance. The performance tuning processed will be performed throughout the application development life cycle. Performance tuning is performed which is based on factors like release time of application and user requirements of application stability, reliability and scalability under load, stress and performance tolerance criteria. In some projects the end criteria is defined based on the client performance requirements defined for each section of the application. When product reaches to the expected level then that can be considered as the end criteria for performance testing.
Q9.How do you identify the performance bottlenecks situations?
Performance Bottlenecks can identify by monitoring the application against load and stress condition. To find bottleneck situation in performance testing we use Load Runner because provides different types of monitors like run-time monitor, web resource monitor, network delay monitor, firewall monitor, database server monitor, ERP server resources monitor and Java performance monitor. These monitors can help to us to determine the condition which causes increased response time of the application. The measurements of performance of the application are based on response time, throughput, hits per sec, network delay graphs, etc.
Q10. What activities are performed during performance testing of any application?
Following activities are performed during testing of application:
1. Create user scenarios
2. User Distribution
3. Scripting
4. Dry run of the application
5. Running load test and analyzing the result.,
Q11. How can we perform spike testing in JMeter?
Spike Testing is performed to understand what changes happens on the application when suddenly large number of user increased or decreased. Sudden changes in the number of user by increasing or decreasing at certain point of application and then monitoring the behavior. In JMeter spike testing can be achieved using Synchronizing Timer. The threads are blocked by synchronizing the timer until a particular number of threads have been blocked, and then release them at once thus creating large instantaneous load.
Q12. What is distributed load testing?
Distributed load testing: in this we test the application for a number of users accessing the application at a same time. In distributed load testing test cases are execute to determine the application behavior. Now application behavior is monitored, recorded and analyzed when multiple users concurrently use the system. Distributed load testing is the process using which multiple systems can be used for simulating load of large number of users. The reason for doing the distributed load testing is that to overcome the limitation single system to generate large number of threads.
Q13. Explain the basic requirements of Performance test plan.
Any Software Performance Test Plan should have the minimum contents as mentioned below:
Performance Test Strategy and scope definitions.
Test process and methodologies.
Test tool details.
Test cases details including scripting and script maintenance mechanisms.
Resource allocations and responsibilities for Testers.
Risk management definitions.
Test Start /Stop criteria along with Pass/Fail criteria definitions.
Test environment setup requirements.
Virtual Users, Load, Volume Load Definitions for Different Performance Test Phases.
Results Analysis and Reporting format definitions
Q14. What is throughput in Performance Testing?
Throughput in Performance testing is the amount of data sent by the server in responds to the client request in a given period of time or it is the number of units of work that can be handled per unit of time. The throughput is measured in terms of requests per second, calls per day, hits per second, reports per year, etc. In most of the cases, the throughput is calculated in bits per seconds. Higher the throughput value, higher the performance of the application It is includes the client side statistics.
Q15. What are the automated Performance testing phases?
The phases involved in automated performance testing are:
Planning/Design: This is the primary phase where team will be gathering the requirements of the performance testing. Requirements can be Business, Technical, System and Team requirements.
Build: This phase consists of automating the requirements collected during the design phase.
Execution: it is done in multiple phases. It consists of various types of testing like baseline, benchmarking testing
Analyzing and tuning: During the performance testing we will be capturing all the details related to the system like Response time and System Resources for identifying the major bottlenecks of the system. After the bottlenecks are identified we have to tune the system to improve the overall performance.
Q16. What is Performance Testing?
Performance Testing is performed to determine response time of the some components of the system perform under a particular workload. It is generally measured in terms of response time for the user activity. It is designed to test the overall performance of the system at high load and stress condition It identifies the drawback of the architectural design which helps to tune the application. It includes the following:
Increasing number of users interacting with the system.
Determine the Response time.
Repeating the load consistently.
Monitoring the system components under controlled load.
Providing robust analysis and reporting engines.
Q17. What is baseline testing?
Baseline testing is a testing which is performed on the application before coming to any conclusion. It can be either the verification or validation process which provides an idea of what the next stage has to do. It is very important testing technique, if done properly, 85% of performance problems can be identified and solved when proper baseline tests are done.
Q18. What is the testing lifecycle?
There is no standard testing life cycle, but it is consist of following phases:
Test Planning (Test Strategy, Test Plan, Test Bed Creation)
Test Development (Test Procedures, Test Scenarios, Test Cases)
Test Execution
Result Analysis (compare Expected to Actual results)
Defect Tracking
Reporting
Q19. What is the difference between baseline and benchmark testing?
The differences between baseline and benchmark testing are:
Baseline testing is the process of running a set of tests to capture performance information. This information can be used as a point of reference when in future changes are made to the application where as Benchmarking is the process of comparing your system performance against an industry standard that is given by some other organization.
Example: We can run baseline test of an application, collect and analyze results, and then modify several indexes on a SQL Server database and run the same test again, using the previous results to determine whether or not the new results were better, worse, or about the same.
Q20. How load testing and performance testing are different from each other?
· This is a simple question and you just need to mention the main difference between the two. Your correct answer would show your practical experience here. Performance testing checks the proper performance of the system in terms of the requests received and processed per second, and the time of response. Load testing verifies capability of the system to handle the increased load and get adapted to work for it. This ability is called scalability of the system or network. Both performance testing and load testing can take place together.
21. What are the three sections of a Vuser script and what is the purpose of each one?
Following are the three sections of Vuser script and they are as follows:
§ Vuser_init – Used for recording the logon.
§ Actions – Used for recording the business process.
§ Vuser_end – Used for recording the logoff.
22. What are the four selection methods when choosing data from a data file?
Following are the four selection methods:
§ Sequential
§ Random
§ Unique
§ Parameter name
23. What should be done to view parameter substitution in the Execution Log?
Parameter substitution can be viewed in the extended log in the Run time settings.
24. What tools are required to analyze Vuser run results?
Following tools are required to analyze Vuser run results:
§ Execution Log
§ Run-Time Viewer and
§ Mercury Test Results window
25. What are all the reasons to use the Server Resources Monitor?
§ Server resources monitor is used to find how much data is coming from Cache and helps to find out what are all the parts of the system have bottlenecks.
26. What is the purpose of selecting ‘Show browser’ during replay in the General Options settings?
§ ‘Show Browser’ setting is used to see the pages that appear during playback. This is useful for debugging Vuser during the initial stages of Web Vuser creation.
27. For what purpose, User will be using ‘continue on’ error?
§ Continue on should be set only when making Execution Logs more descriptive or adding logic to the Vuser.
28. What is the purpose of a LoadRunner transaction?
§ The purpose of a Load Runner transaction is to measure one or more steps/user actions of a business process.
29. In a Web server, Database and Network are all working fine and now, Where could be the problem?
§ The problem could be in the system itself or in the application server or in the code written for the application.
30. What is VuGen Recording and Scripting?
§ LoadRunner script code is obtained by recording in the ANSI C language syntax and it can be viewed in the script view.
31. What is Performance testing in LoadRunner?
§ Performance testing can be done by calculating the timing for both read and update transactions and check whether system functions are being performed in an acceptable timeframe. In a multi user environment, it is necessary to determine the effect of multiple transactions on the timing of a single transaction.
32. What is the Configuration of systems when using Load Runner?
§ The configuration of systems refers to that of the client machines in which we will run Vusers. The configuration of client machine includes its hardware settings, memory, operating system, software applications, development tools, etc.
§ This system component configuration should match with the overall system configuration so as to achieve the load testing objectives.
33. How Load Runner interacts with the application?
§ Protocol is used in Load Runner to interact with the application.
34. What is the latest version and language used in Load Runner?
§ As of 20-Feb-2013 Load Runner 11.5 is the latest version and VUser script is used like a C Language.
§ Following languages are supported by LoadRunner:
§ 1. C Language
2. Visual Basic Scripting
3. Visual Basic For Applications
4. Java Scripting
35. What is a function to capture dynamic values in the web vuser script?
§ Web_reg_save_param function saves dynamic data information to a parameter.
36. When do you disable log in Virtual User Generator, When do you choose standard and extended logs?
Once 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.
Standard Log Option:
When you select Standard log, it creates a standard log of functions and messages sent during script execution to use for debugging. Disable this option for large load testing scenarios. When you copy a script to a scenario, logging is automatically disabled
Extended Log Option:
Select extended log to create an extended log, including warnings and other messages. Disable this option for large load testing scenarios. When you copy a script to a scenario, logging is automatically disabled. We can specify which additional information should be added to the extended log using the extended log options.
37. How do you 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.
38. Explain the Configuration of your systems?
The configuration of our systems refers to that of the client machines on which we run the Vusers. The configuration of any client machine includes its hardware settings, memory, operating system, software applications, development tools, etc. This 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.
39. How did you find 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.
40. How did you find database related issues?
By running “Database” monitor and help of “Data Resource Graph” we can find database related issues. E.g. you can specify the resource you want to measure on before running the controller and than you can see database related issues
41. How did you plan the Load? What are the Criteria?
Load 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.
42. What does vuser_init action contain?
Vuser_init action contains procedures to login to a server.
43. What does vuser_end action contain?
Vuser_end section contains log off procedures.
44. What is think time? How do you change the threshold?
Think time is the time that a real user waits between actions.
Example:
When a user receives data from a server, the user may wait several seconds to review the data before responding. This delay is known as the think time.
Changing the Threshold:
Threshold 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.
45. What are the three sections of a Vuser script and what is the purpose of each one?
1) Vuser_init - used for recording the logon.
2) Actions - used for recording the business process.
3) Vuser_end - used for recording the logoff.
46. For what purpose are Vusers created?
Vusers are created to emulate real users acting on the server for the purpose of
Load testing.
47. What are the benefits of multiple Action files within a Vuser?
They allow you to perform different business processes in one Vuser to repsent
A real user who does the same thing. They let you build Vusers that emulate real
Users defined in the User Community Profile. They also allow you to record the
Login and logoff separately from the Action files and thus to avoid iteration.
48. How can you tell the difference between an integer value and a string value
In a VuGen script?
Strings are enclosed in quotes; integers are not.
49. What is the easiest way to get measurements for each step of a recorded script?
For the entire action file?
Enable automatic transactions.(Runtime settings, Recording Options)
50. When would you parameterize a value rather than correlate queries?
Parameterize a value only when it is input by the user.
51. What are the four selection methods when choosing data from a data file?
Sequential, Random, Unique, and Same line as <parameter_name>.
52. How can reusing the same data during iterative execution of a business process
Negatively affect load testing results?
In reusing the same data for each iteration, the server recognizes the same data is
Requested and places it in its cache. The load test then gets performance results
That is not based on real server activity but caching. This will not provide the correct
Results during the analysis of the load test.
53. How can caching negatively affect load testing results?
When data is cached in the server’s memory, the server does not need to fetch it
From the database during playback. Then, test results do not reflect the same performance they would if real users were loading the system with different data.
54. Why is it recommended to add verification checks to your Vusers?
You would want to verify, using LoadRunner that the business process is functioning
As expected under load.
55. When does VuGen record a web_submit_data instead of a web_submit_form?
Why? (Be as specific as possible)
A web_submit_data is recorded when VuGen cannot match the action, method,
Data fields, and/or hidden data values with the page that is stored in the record
Proxy cache. Comparison failures are typically caused by something other than
HTML setting the properties of the HTTP request. Because VuGen can parse only
HTML, it cannot find all the properties of the HTTP request in memory. This
Results in the hard-coding of all the request information in a web_submit_data
Statement.
56. What do you need to do to be able to view parameter substitution in the Execution
Log?
Check extended log and Parameter substitution in the Run-Time Settings.
57. How can you determine which field is data dependent?
Rerecord the same script using different input values, then compare the two
Scripts.
58. Where should the rendezvous is placed in the script?
The rendezvous should be placed immediately before the transaction where you
want to create peak load. In this case, the rendezvous should be placed right
before starting the Update Order transaction.
59. For what purpose should you select continue on error?
Set it only when making Execution Logs more descriptive or adding logic to the
Vuser.
60. What is the purpose of selecting Show browser during replay in the General
Options settings?
This setting allows you to see the pages that appear during playback. This is useful
for debugging your Vuser during the initial stages of Web Vuser creation.
61.
What tools does VuGen provide to help you analyze Vuser run results?
Execution
Log, Run-Time Viewer, and Mercury Test Results window.
62.
If your Vuser script had two parameters, “Depart City” and “Arrival City,” how
could
you have the Vuser script return an error message which included the city
names?
lr_error_message
(“The Vuser could not submit the reservation request for %s to
%s”,
(lr_eval_string (“”), lr_eval_string (“”));
63.
Why should you run more Vusers than your anticipated peak load?
(1)
To test the scalability of the system.
(2)
To see what happens when there is a spike in system usage.
64.
Why wouldn’t you want to run virtual users on the same host as the Load-
Runner
Controller or Database Server?
Running
virtual users on the same host as the LoadRunner Controller will skew
the
results so that they no longer emulate real life usage. By having both the
Controller
and
the Vusers on the same machine, the tester will not be able to determine
the
effects of the network traffic.
65.
Each time you run the same scenario, the results will be slightly different.
What
are
some of the factors that can cause differences in performance measurements?
Different
factors can effect the performance measurements including network
traffic,
CPU usage and caching.
66.
What are some of the reasons to use the Server Resources Monitor?
To
find out how much data is coming from the cache
T o help find out what parts of
the system might contain bottlenecks
67.Most
imp aspect of load testing?
As mentioned getting the scenario right and answering the
business question.No point telling them, “it breaks at 1000 users, when they
have 100 people working there and they were concerned only with network latency.”
68.
What kind of appls LR tests?
LR tests client/server and web based appls.
69. Analysis Scenario (Bottlenecks): In
Running Vuser graph correlated with
the response time graph you can see that as
the number of Vusers increases, the average response time of the check
itinerary transaction very gradually increases. In other words, the average
response time steadily increases as the load
increases. At 56 Vusers, there is a sudden, sharp increase in the average response
time. We say that the test broke the server. That is the mean time before failure (MTBF). The response time clearly began to degrade when there were more than 56 Vusers running simultaneously.
increases. At 56 Vusers, there is a sudden, sharp increase in the average response
time. We say that the test broke the server. That is the mean time before failure (MTBF). The response time clearly began to degrade when there were more than 56 Vusers running simultaneously.
70. What is load
runner Agent.
Agent is interface
between host machine and controller
Used to generate/create
load against applications
71.How many VUsers are
required for load testing ?
This is essentially a trick question.
The number of VUsers
required depends on your system under test , network configurations , hardware
settings, memory, operating system, software applications objective of
performance test. There can not be any generic value for Vuser.
72) What are monitors?
Monitors are used to
"monitor" performance bottlenecks. They are used in Controller
section of Load Runner
73) What would be your
recommendation to improve performance measure?
Fine Tuning of
network, database, and app and web server is recommended.
At the network level
try to optimize the latency and bandwidth.
At database level,
verify all indexes and sequences by running profilers. You may also optimize
your database queries.
At the App server
level, run profilers for finding the memory leaks in the application
At the web server
level you can use monitors and optimize the throughput and other related metrics
of the server.
74) What is the
difference between transaction and transaction instance in loadrunner ?
A transaction is used
to measure time between executions of certain statements
A transaction instance
is used for performance analysis
75) What is Elapsed
Time in Load Runner?
Elapsed time
designates how much time has passed since the launch of the current event and
is measured differently for different screens as given below -
In Scenario Status
Window - Elapsed time is measured from the moment you hit "Start
Scenario" or " Initialize/Run Vuser?" button.
In "Vuser"
window elapsed time is measured form the moment Vuser enters
"running" state.
76) Does caching have
a negative effect on your load testing results ?
Yes. Caching has a
negative effect. Cache is temporary memory which stores your browsing history.
When you visit a page for the SECOND time , the time required to load the page
will be less than that required to load the page for your first visit since
much of the information required to load the page is grabbed from the cache
instead of the server. This will effect the response times in your test. Hence,
it is recommended to turn-off caching.
77) What is the difference between load , performance testing ?
The objective of
performance testing is to check whether an application loads/updates
within stipulate time limit (say 2 seconds). It uses metrics like response time
, Requests per second. It is carried out under production - like load
conditions.
The objective of load
testing is to check scalability of the system. For example, finding out the
maximum number of users supported by the system within certain specifications.
2.What is correlation? Explain the difference between automatic correlation and manual correlation? - 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). Automatic correlation is where we set some rules for correlation. It can be application server specific. Here values are replaced by data which are created by these rules. In manual correlation, the value we want to correlate is scanned and create correlation is used to correlate.
6.What is Correlation and why we need correlating statements?
7.What is the difference between correlation and
parameterization?
Correlation:
1. What is
Correlation?
Correlation is used to
obtain data which is unique for each run of your test script (ex: session ids).
While
recording, these dynamic values are hard-coded in your script causing the
script to fail during playback.
Correlation is a technique where dynamic values
are not hard-coded in your script but are extracted at run-time to
avoid
failure.
Correlation
is identifying and resolving data that is unique for each script run action
iteration. Each rerun of the
data is different from the original recording and
this causes failures.
2.What is correlation? Explain the difference between automatic correlation and manual correlation? - 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). Automatic correlation is where we set some rules for correlation. It can be application server specific. Here values are replaced by data which are created by these rules. In manual correlation, the value we want to correlate is scanned and create correlation is used to correlate.
3.How do you find out where
correlation is required? Give few examples from your projects? -
Two ways: First 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. Secondly, we can record two scripts and compare them. We can look
up the difference file to see for the values which needed to be
correlated. In my project, there was a unique id developed for each
customer, it was nothing but Insurance Number, it was generated automatically
and it was sequential and this value was unique. I had to correlate this value,
in order to avoid errors while running my script. I did using scan for
correlation.
4.Where do you set
automatic correlation options? - Automatic
correlation fromweb 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.
5.You have created
several Auto Correlation rules. A new tester on your team is preparing to
record a group of scripts on the same application on his workstation. What can
you do to provide the tester with the correlation rules?
I would export
the Auto Correlation rules to a .cor file, and then have the new team member
import the .cor file into his Auto Correlation rules
6.What is Correlation and why we need correlating statements?
Correlation is used to obtain data which is
required 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. The Reason for Correlating the statements are:
- To
simplify or optimize the code.
- To
generate dynamic data.
- To
accommodate unique data records.
Correlation can be done automatically or
manually:
Automatically: VUGen dynamically detects dynamic values during recording and allow correlating.
Manually: correlate a script by adding the code correlation function.
Automatically: VUGen dynamically detects dynamic values during recording and allow correlating.
Manually: correlate a script by adding the code correlation function.
7.What is the difference between correlation and
parameterization?
Differences between correlation and
parameterization are below:
- In
correlation, dynamically generated values or data are used throughout the
script where as in parameterization, user defined or user provided values
are used.
- The
values in correlation is given by the server automatically where as in
parameterization, values is given by database manually.
- In
correlation, Tester doesn’t know these values but in parameterization
tester know these values.
- Sometime
correlation is mandatory but parameterization is optional.
8. Where
are automatic correlation options set?
·
The automatic correlation
is set in recording options area on the correlation tab. From here, correlation
can be enabled for the full script and rules for correlation can be
defined. Automatic correlation can be performed on a database by
viewing the output window, scanning for correlation, and selecting the value
that will be used.
9. Where is the number
of iterations set for testing with Vuser scripts?
·
The number of iterations is
set in the VuGen pacing tab in the Run-time settings area.
10. What correlation function is
available in LoadRunner?
Wdiff is a LoadRunner tool that can be user to
determine dynamic data that can be correlated. Another tool is
web_reg_save_param, which can be used to locate and save instances of text
strings.Learn about this function more.
11. How is correlation performed?
a.
Determine values that will be correlated
b. Determine the upper and lower boundaries of the
instances of the value c.
Use the web_reg_save function to parameterize all instances of the value (and
do not forget to include the escape character)
12.
List of attributes used in web_reg_save_param fn?
Find below the
available attributes [<List Of Attributes>]. Note that the attribute
value strings (e.g. Search=all) are not case sensitive.
NotFound The handling method
when a boundary is not found and an empty string is generated. “ERROR,” the
default, indicates that VuGen should issue an error when a boundary is not
found. When set to “EMPTY,” no error message is issued and script execution
continues. Note that if Continue on Error is enabled for the script, then even
when NOTFOUND is set to “ERROR,” the script continues when the boundary is not
found, but it writes an error message to the Extended log file.
LB The left boundary of
the parameter or the dynamic data. This parameter must be a non-empty,
null-terminated character string. Boundary parameters are case sensitive; to
ignore the case, add “/IC” after the boundary. Specify “/BIN” after the
boundary to specify binary data.
RB The right boundary of
the parameter or the dynamic data. This parameter must be a non-empty,
null-terminated character string. Boundary parameters are case sensitive; to
ignore the case, add “/IC” after the boundary. Specify “/BIN” after the
boundary to specify binary data.
RelFrameID The hierarchy level of
the HTML page relative to the requested URL.
Search The scope of the
search—where to search for the delimited data. The possible values are Headers
(search only the headers), Body (search only Body data, not headers), or ALL
(search Body and headers). The default value is ALL.
ORD This optional parameter indicates the ordinal or occurrence number of the match. The default ordinal is 1. If you specify “All,” it saves the parameter values in an array.
SaveOffset The offset of a sub-string of the found value, to save to the parameter. The default is 0. The offset value must be non-negative.
ORD This optional parameter indicates the ordinal or occurrence number of the match. The default ordinal is 1. If you specify “All,” it saves the parameter values in an array.
SaveOffset The offset of a sub-string of the found value, to save to the parameter. The default is 0. The offset value must be non-negative.
Savelen The length of a
sub-string of the found value, from the specified offset, to save to the
parameter. The default is -1, indicating until the end of the string.
Convert The conversion method
to apply to the data:
HTML_TO_URL: convert
HTML-encoded data to a URL-encoded data format
HTML_TO_TEXT: convert
HTML-encoded data to plain text format
1.What is Parameterizion?
3.What is LoadRunner parameter?
The simple answer is:
LoadRunner parameter is a special variable.
3.What is the need of Checkpoints in LR?
Parameterization:
1.What is Parameterizion?
It is the process of testing the application
with the help of different data. It is used when
application values are
changing in the application.
- In data Parameterization we take the help of variable take the different data value form
- the data pool. It also reduces the size of the scripts.
- It helps in emulation real scenario as it avoids caching effect, if we send same data again
- and again while running same scripts in iteration, then the data could be used from cache
- or from the temporary table from the
database.
Two tasks for Parametrization in LoadRunner:
- Replacing the constant values with parameters
(in Vuser script)
- Setting the properties and data source for the
parameters
Limitation of Parametrization in LoadRunner – Text strings that are not function
arguments can not be parametrize.
It is the way of
replacing a hard coded value in the script with a parameter which represents a
list of values.
· VuGen generates a script that contains the actual
values used during recording and during script enhancement phase test engineer
has to replace the recorded values with parameters is known as parameterizing
the script.
2. Why Parameterization?
Parametrization is
important because
·
It
allows you to test your script with different values
·
Reduces
the size of your script
Steps in
Parametrization
·
Replace
the constant values in Vuser Script with parameters
·
Set
the data source for the parameter , so different values can be selected
at run tim
3.What is LoadRunner parameter?
The simple answer is:
LoadRunner parameter is a special variable.
4.What's the difference between LR parameter
and stack-based variables?
// That is the question (C) W. Shakespeare :)
OK, I will answer - the LoadRunner parameters simplify:
// That is the question (C) W. Shakespeare :)
OK, I will answer - the LoadRunner parameters simplify:
- Working with memory
That is, you don't have to know, how many bytes allocate for a current value of parameter.
You just use lr_save_string (for example) function, and LR allocates required number automatically. - Working with data sources
For example, you can indicate, that values of parameters will be stored in a file:
In this
case, you don't have to write additional code for file processing. LoadRunner
takes all routine procedures upon himself. For example - when and how update
values from file, what is the current delimiter, and so on.
Actually, these features (working with memory and data sources) are very comfortable from user's side. That's why LoadRunner parameter is used so extensively.
Actually, these features (working with memory and data sources) are very comfortable from user's side. That's why LoadRunner parameter is used so extensively.
5. Objectives of parameterization??
One of the main objective of parametrization is to simulate real
user behavior while running the test and we also use this to solve below
problem
· Solve Date
constraints that may occur during playback
1. Eg: When Second Virtual User accessing the
Application user may fail because of the 2/14/99 was yesterday!]
· Solve data
caching that may occur during playback
1. Eg: When Second Virtual User accessing
the Application, user will get data from Cache
· Solve unique
constraints that may occur during playback
Eg: Order number 1234 is already here
· Solve data
dependency that may occur during playback
· Emulate real
user activity
·
Exercise the server (Some
times when we are searching with same keyword, the request will not go to
database and it will get the data from the webserver cache and it will not
exercise the server. Parameterization will solve this problem)
6. Parameter
Customization??
1.Select
Columnà By Number
à By
Name
These values are used when we have multiple columns in the same table with the
same parameter type. We can select for each parameter by number as column
number or by name as column name.
2. File Formatà Column Delimiter
à First Data Line
Column
Delimiter drop down has values Comma,Tab,Space which are used to separate
multiple columns.
First
Data Line is a number which it uses that number row data at the time of
execution. For eg: if you increase the number to 2 by using up button then the
execution starts from 2nd row data.
3. Select Next Row à Sequential
à Random
à Unique
Update
Value on 1 Each Iteration
2 Each Occurrence
3 Once
If you
select Select Next Row as Sequential and Update Value On as Each iteration then
the users will execute the data sequentially for each iteration.
Click on
close button and press CTRL+L buttons then parameter properties window will
open with all parameters in left side and right side parameters data window.
If you
click on Simulate Parameter button and then enter the
iterations in check box and then click on simulate button then we will get the
user behavior when the time of execution how the parameters will pass to the
vusers.
If you
select Update value on as Each Occurrence we can not simulate the parameter.
If you
select Update value on as Once then the vuser will take only one set of data
for all vusers. For ex: In the above snapshot we will get jojo and bean for
each and every vuser we execute.
If you
select Select Next Row as Random and Update value on as Each iteration then the
user will pick random data for each and every iteration. At that we have to
select for one parameter these values and select Same line as that parameter
name for remaining parameters
For Ex:
If we select RandomàEach iteration for Username then we have to select Same
line as username for password.
If you
select Select Next Row as Unique and Update value on as Each Iteration or Each
Occurrence then automatically When Out of Values and Allocate
Vuser values in the controller will be enabled.
When Out
Of Valuesà Abort Vuser
à
Continue in a cyclic manner
à Continue
with last value
Allocate
Vuser values in the controller(Radio Buttons)
Automatically allocate block size,
Allocate ______ values for each vuser
If
you have values less than vusers at that time we have to select UniqueàEach
IterationàAbort Vuser then what ever the users extra are aborted from the
execution.
OR
We can
select UniqueàEach IterationàContinue in a cyclic manner
OR
We can
select UniqueàEach IterationàContinue with last value
And we
can select any of the two radio buttons for Allocate vuser values in the
controller in the above three different cases
If you
select Uniqueà Each Occurrence only
Allocate ______ values for each vuser will be enabled for all the three cases
And you
can click on Simulate Parameter button for each and every different options
customized to view how the vuser behavior.
If you
select Uniqueà Once all the vusers will execute with one set of data.
Once
parameterization is done click on close button. Test the data execution procedure
in the form of iterations in VUGen.
8.Parameter types in LR?
Parameterization
provides the ability to use different values in scripts and thus helps create
data driven test scenarios. Parameterization also reduces the size of scripts.
I recently attempted to search for articles and couldn’t find
a consolidated list of the main loadrunner parameters and their
usage.So decided to compile a list and write this article.
This
article will outline:
1.
The
important types of loadrunner parameters.
2.
How and
when to use them while scripting
The
Loadrunner parameter types that I will describe are -
·
File
·
Table
·
XML
·
Unique Number
·
Date/Time
·
Vuser
ID
These
are the most widely used parameter types in the performance testing domain.
Vusers take value from the data file and table. When a file type or table type
parameter is used, a .dat file is created. By default all the data files are
named as <ParameterName>.dat and are stored in the script’s directory. When
VuGen opens the data file, it displays the first 100 rows. To view all of the
data, click ‘Edit with Notepad’ and view the data in ‘parameter properties’.
File
& Data type parameters are usually used -
·
One
file can contain values for many parameters. Every column holds the
data for one parameter. Column breaks are maintained using delimiters
like ‘comma’, etc
·
When
data in an external file and in tabular format is available. (eg. data obtained
by running an SQL query)
Note
– In ‘text editor’, columns are separated by using ‘delimiters’. New rows are
added as new table line.
XML
Parameter Types are used for multiple valued data contained in an XML
structure. It replaces a complex structure in which an array can be made a part
of another array. The complex structure as required in a web-service call can
be replaced with a single XML parameter.
Eg.,
An XML parameter by the name Contact can replace a name, email id, mobile
number, and address.
XML
parametrization helps to have cleaner input of the data, and enables efficient
parametrization of Vuser scripts. XML parameters are widely used with Web
Service scripts and with SOA services.
Random
Number replaces the parameter with a random number. While creating random type
parameter, minimum and maximum values of the range (the range, out of which the
random number is planned to be selected) is required to be set.
A
Random type parameter can be used -
·
To
sample a system’s behaviour within a possible range of values. Eg.
To randomly view the details of 50 incidents being created in the system,
one can specify the range for 50 serial incident ids (eg., Min – 40001,
Max - 40050) and emulate the situation. Randomly incident details will be
viewed by Vusers.
·
Percentage distribution of tasks’ execution by Vusers. Random number can be
set to have a range of 100. Using if loop one can achieve appropriate
percentage distribution of different tasks.
Iteration
number parameter type replaces the parameter name with Vuser’s current
iteration number.
An
iteration type parameter can be used -
·
To
print the Vuser’s iteration number in external file as sometimes
required while debugging scripts for data-issues.
·
To
allocate a unique data input per Vuser.
Unique Number
Unique
number parameter replaces the parameter with a unique value. This value is
taken from the range set by entering the start value and the size of the range.
Unique
number type of parameter is used -
·
To enter
a unique value in the data field while script execution. (eg. Setting a
unique username for a SignUp transaction of a website)
·
To check
system’s behavior for all possible values of the parameter.
Eg., Executing a query for all employees, whose ID numbers range from 100 through 199, create 100 Vusers and set the start number to 100 and block size to 100.
Eg., Executing a query for all employees, whose ID numbers range from 100 through 199, create 100 Vusers and set the start number to 100 and block size to 100.
A
LoadGenerator is the machine on which Vusers perform the steps as in the
scripts. During test execution, Load Generator Name type parameter replaces the
parameter with the name of the Vuser script’s load generator.
A
LoadGenerator type of parameter is used -
·
While debugging
scripts, to understand if failures exist only at a
particular loadgenerator.
·
To segregate
results and logs between different loadgenerators.
Date/Time parameter type
A
Date/time parameter replaces the parameter with a date and/or time. One can
specify one’s own format of date/time representation.
Date/time
parameter type is used in -
·
Business scenarios
in which vuser wants to get specific details for specific duration of time. In
the form data, the ‘from’ field-type will have value of last month’s date-time
and the ‘to’ field will have date/time of current date-time.
·
Scenarios in
which vuser has to enter a date-time value.
·
Scenarios in
which vusers have to enter a unique string value for a field.
Vuser Id parameter type
a
Vuser ID replaces the parameter with the ID number assigned to the Vuser by the
Controller during a scenario run. When you run a script from VuGen, the Vuser
ID is always 1.
Vuser
id parameter type is used -
·
To print
the vuser id in an external file for script-debugging purpose.
·
To segregate
transaction volume based on Vuser ids.
A
User defined parameter type is a user-defined function in which call to the
function is made and the value returned by the function replaces the parameter
name.
This
type of parameter is used in following cases -
·
Random function
can be called to capture one out of the many co-related values stored in
an array (created by web_reg_save_param).
·
To obtain
a value in a specific format that is not supported by other parameter
types.
9.Parameter Properties?
Sequential
Ø The Sequential method
assigns data to a Vuser sequentially. As a running Vuser accesses the data
table, it takes the next available row of data.
Ø If there are not
enough values in the data table, VuGen returns to the first value in the table,
continuing in a loop until the end of the test.
Random
Ø The Random method
assigns a random value from the data table to each Vuser at the start of the
test run.
Unique
Ø The Unique method
assigns a unique sequential value to the parameter for each Vuser. In this case
you must make sure there is enough data in the table for all the Vusers and
their iterations. If you have 20 Vusers and you want to perform 5 iterations,
your table must contain at least 100 unique values.
Ø Examples
Ø Assume that your
table/file has the following values:
Ø Kim; David; Michael;
Jane; Ron; Alice; Ken; Julie; Fred
Ø Sequential Method
Ø If you specify update
on Each iteration, all the Vusers use Kim in the first iteration, David in the
second iteration, Michael in the third iteration, and so on.
Ø If you specify update
on Each occurrence, all the Vusers use Kim in the first occurrence, David in
the second occurrence, Michael in the third occurrence, and so on.
Ø If you specify update
Once, all Vusers take Kim for all iterations.
Ø Important: If you select the
Sequential method and there are not enough values in the data table, VuGen
returns to the first value in the table, continuing in a loop until the end of
the test.
Ø Examples
Ø Assume that your
table/file has the following values:
Ø Aman; Arun; Priya;
Anjana; Sanjana; Rajan; Tarsem; Shiva; Madhur
Ø Sequential Method
Ø If you specify update
on Each iteration, all the Vusers use Aman in the first iteration, Arun in the
second iteration, Priya in the third iteration, and so on.
Ø If you specify update
on Each occurrence, all the Vusers use Aman in the first occurrence, Arun in
the second occurrence, Priya in the third occurrence, and so on.
Ø Random Method
Ø If you specify update
on Each iteration, the Vusers use random values from the table for each
iteration.
Ø If you specify update
on Each occurrence, the Vusers use random values for each occurrence of the
parameter.
Ø If you specify update
Once, all Vusers take the first randomly assigned value for all the iterations.
Ø Unique Method
Ø If you specify update
on Each iteration, for a test run of 3 iterations, the first Vuser takes Kim in
the first iteration, Arun in the second, and Priya in the third. The second
Vuser takes Anjana, Sanjana and Rajan. The third Vuser, Tarsem, Shiva, and
Madhur.
Ø If you specify update
on Each occurrence, then the Vuser uses a unique value from the list for each
occurrence of the parameter.
Ø If you specify update
Once, the first Vuser takes Aman for all iterations, the second Vuser takes
Arun for all iterations, and so on.
Ø
Checkpoints:
1.What is checkpoint?
A checkpoint compares
stored value with actual (present) value and reports pass or fail status
You can create a
checkpoint during recording or while enhancing the vuser script.
Types of Checkpoints
·
Text
Check
·
Image
Check
2. What are the types of
check points is available in LoadRunner?
·
Loadrunner
provides two types of check points
·
a)
Image Checkpoints : This checkpoint will verify the presence of an image on a
page during run-time
·
b)
Text Checkpoint : This checkpoint will verify the presence of a text-string on
a page during run-time
·
Both
of the above checkpoints can be added in Vugen.
3.What is the need of Checkpoints in LR?
When running a test, sometime we need to
verify if certain content is found on the returned page. A content check
verifies that expected information appears on Web page while the script is
running.
Two types of content check:
- Text
Check: checks that a text string appears on a web page.
- Image
Checks: checks for an image on a web page.
4.what is global checkpoint?
The global checkpoint
is to flush/store the log (in memory
too) onto a
disk.
The global checkpoint is a more frequent activity,
therefore, the log on
the disk has more up-to-date transaction than the snapshot
on disk,
which created by local checkpoint
too) onto a
disk.
The global checkpoint is a more frequent activity,
therefore, the log on
the disk has more up-to-date transaction than the snapshot
on disk,
which created by local checkpoint
ReplyDeleteI really like this, I just discovered this. Will be exposing and your prepared to writing buddies.Thank you for your benefits. This was a really amazing material. Thanks for offering these details. :)
Laptop Repairing Course in Delhi
LED LCD Repairing Institute in Delhi
LED LCD Repairing Course in Delhi
Mobile Repairing Institute in Laxmi Nagar
Mobile Repairing Institute in Delhi
Mobile Repairing Course in Delhi
Mobile Repairing Course in Laxmi Nagar
best baby walker
ReplyDelete123movies
ReplyDeletephotography whatsapp groups
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThis is really informative info..!! Thanks for sharing it Weighing Machine for kitchen
ReplyDelete