Sie sind auf Seite 1von 10

1.

Types of performance testing


Types of performance test are:
1) Load Testing.
2) Stress Testing.
3) Endurance Testing
4) Spike Testing
5) Volume Testing.

Load testing:

1) Load Testing:
The test execution with a specified user load under given conditions. Major focus will be on system
stability, response times and success and failures.

2) Stress Testing:
The test execution where we continuously increase the load on the application until it crashes. Major
focus will be on the threshold limit of users and response time is not at all considered.

3) Endurance Testing:
The test execution where we load the application continuously for longer duration's like days or
months to identify bottlenecks like memory leaks.

4) Spike Testing: The test execution where the application is loaded with varied user load suddenly
(sudden increase and decrease) to check the system behavior.

5) Volume Testing:
The test execution where we send the continuous data to the db to check whether it can handle that
much volume of data at a time.

2 explain work load modelling


Load distribution across all the identified scenarios of AUT is called the Workload. Workload model of an application
depicts how this application will be used in the production environment. In order to get such performance test results
which portray the true picture of AUT, it should be tested on a workload model which is very similar to the production
environment.

3 what is concurrent users hit in load testing

5 How to identify performance bottleneck situations Performance Bottleneck Identification

1. Identifying Performance Bottlenecks


2. A bottleneck is any resource hardware, software or network that limits the performance of an application

These are found at each and every tier/component of an application

Resolving the bottlenecks requires special tools and skills

What is a bottleneck?

3. Response times get slower

In efficient resource utilization

Application is not scalableSupports less number of concurrent users


Loss in business revenue due to less customer satisfaction

System crash Impact of Performance bottlenecks

4. J2EE applications are very complex

Presence of multiple components and layers

Complex code written by multiple teams

Large spectrum of technologies

Challenges in Identifying Bottlenecks in J2EE

5. Load Testing tools

HP Load Runner, Jmeter, SandStorm

Profilers Yourkit, Jprobe, JProfiler

Diagnostic tools HP Deep diagnostics, Dynatrace, InfraRed GC Analyzers jConsole, HP jtune,

Resource monitoring tools: Windows perfmon, vmstat, JMX, SNMP monitors

Tools for Identifying Bottlenecks in J2EE

6. Run the load tests to measure the current performance of an application

Use a diagnostic tool during the load test to identify bottleneck layers/components

Use the profiler to further debug the problematic code and fix it

Monitor and analyze the heap usage of the app server

Monitor and analyze the resource consumption of the servers on which application being tested is deployed

Process of Identifying Bottlenecks in J2EE

7. Can be used during load test

Provides tier wise breakdown of transaction response times

Helps in identifying the bottleneck component, tier

Less overhead on the system under test Diagnostic tools

8. Provides information on method executions, call traces, memory utilization, thread execution details

Helps in identifying the bottleneck in a particular section of code

Has a huge overhead on the system under test Profilers

6 What activities are performed during performance testing of any application?


7 Threads vs Process

Process is defined as the virtual address space and the control information necessary for
the execution of a program while Threads are a way for a program to split itself into two or
more simultaneously running tasks. In general, a thread is contained inside a
process and different threads in the same process share some resources while different
processes do not.
Source
In terms of Loadrunner, when we run Vuser as a process, LoadRunner creates 1 process
called mmdrv.exe per Vuser. So if we have 10 Vusers, we will have
10 mmdrv.exe processes on our machines.
while when we run Vuser as a thread, LoadRunner creates 1 thread per Vuser. So if we have
10 Vusers, then we will have 1 process with 10 threads running inside it if the limit is 10
threads per process.

8 Hits per second vs Transactions per second

9 5 function’s in Vu-gen
LR_OUTPUT_MESSAGE()
This function is used to display the message in an output window.

Example program to demonstrate

Action()
{
lr_output_message("Welcome to load runner")
}

Output: Action.(3):Welcome to load runner

Note:-If u want to see only message without logs then go to Run Time Settings and disable logs

To display the message (which is stored in a variable)

Note:- If u want to ignore the line numbers then use lr_message instead of lr_output_message

Output:Welcome to load runner

LR_LOG_Message():-
This function is used to display a log message .It will writes the log message in to log file.

Output:Welcome to load runner

Note: To enable logs go to Run Time Settings and enable logs and log messages will be saved into log
file during the test execution in controller.

LR_SAVE_DATETIME():
It captures and saves the system's current date and time.
below are the few keywords which are used in lr_save_datetime

a----------------------------------->day with a part of name


A---------------------------------->Full name of the day.
b----------------------------------->name of the month(only a part of the month name)
B----------------------------------->Full name of the month
#----------------------------------->Will ignores 0 in the month
%d--------------------------------->To display the day in digits
%m--------------------------------->To display the month in digits
%M--------------------------------->To display the minutes
%y----------------------------------->displays year but contains only 2 digits
%Y---------------------------------->displays year but contains 4 digits
%c-----------------------------------> system current time along with time
date_now
A system keyword to captures the today's date

Action()
{
lr_save_datetime("%c",date_now,"abc");
lr_output_message(lr_eval_string("{abc}"));
return 0;
}

LR_SAVE_STRING():
This function is used to save the string value into another string variable

Action()
{
lr_save_string("welcome to load runner","abc");
lr_output_message(lr_eval_string("{abc}"));
return 0;
}

Action()
{
char *temp="welcome to load runner";
lr_save_string(temp,"abc");
lr_output_message(lr_eval_string("{abc}"));
return 0;
}

Note:
lr_save_string canot save the int values in to string variable

LR_SAVE_INT():
This function is used to save the int value into another string variable

Action()
{
lr_save_int(1213123,"abc");
lr_output_message(lr_eval_string("{abc}"));
return 0;
}

Action()
{
int i=1213123;
lr_save_int(i,"abc");
lr_output_message(lr_eval_string("{abc}"));
return 0;
}

Note:
lr_save_string canot save the int values in to string variable

10 How do you capture a dynamic value from the header of a HTTP response in Vu-Gen

11 What is co-relation and explain it to a business partner

12 What are the .NET counters which you would monitor?

CPU & Memory Usage


This is actually a complicated subject. You potentially want to track CPU and memory for your server, an IIS
application pool, and your application itself. Since an IIS application pool can execute multiple applications, you may
want to get down to that level of detail, which are different counters.

Server level

 Processor – % Processor Time: This tracks the overall CPU usage of the entire server.
 Memory – Available MBytes: The numbers of megabytes in memory not being used.

Note: This is where things start to get tricky. You have to know the process name of your counter. It is likely w3wp,
w3wp#1, etc. (More on this later)

 Process – % Processor Time: CPU used for just your application pool.
 Process – Working Set – Private: Memory being used by your IIS application pool.

ASP.NET Application
Note: For these counters, you need to know the instance name of your application. They should be something like
_LM_W3SVC_1_ROOT_AppName. (More on this later)

 ASP.NET Applications – % Managed Processor Time (estimated): This allows you to get the
estimated CPU time for your specific application, and not the entire IIS application pool which could be
multiple applications.
 ASP.NET Applications – Managed Memory Used (estimated): This allows you to get the estimated
memory usage for your specific application, and not the entire IIS application pool which could be multiple
applications.

Web Traffic Counters


There are several different counters that are helpful to track how much traffic your web application is getting. Things
like the number of requests, the amount of data, etc.

 ASP.NET Applications – Requests/Sec: It is a good idea to monitor how many requests are handled by
both IIS and ASP.NET. Some requests, for example, static files, may only be processed by IIS and never
touch ASP.NET.
 Web Service – Bytes Received/Sec: Identify potential spikes in traffic of data coming in.
 Web Service – Bytes Sent/Sec: Identify potential spikes in traffic of data going out.
 Web Service – Current Connections: Track this so you know what is normal for your application to
help identify spikes.
 ASP.NET Applications – Requests in Application Queue: If this number is too high, your server may
not be able to handle requests fast enough.
Exception & Error Rate Counters
It is really common for an application to have high exception rates that nobody knows about. Problems can be hidden
deep in your code. By tracking these counters, you can get visibility into these types of problems. I highly recommend
monitoring these.

 .NET CLR Exceptions – # of Exceps Thrown: Track all .NET exceptions that are thrown even if they
are handled and thrown away. High rates of exceptions can cause hidden performance problems.
 ASP.NET Applications – Errors Unhandled During Execution/sec: You need to know how many
exceptions were unhandled and may have been visible to your users.
 ASP.NET Applications – Errors Total/Sec: Number of errors during compilations, pre-processing and
execution. This may catch some types of errors that other exception counts don’t include.

Garbage Collection Counters


The number of collections is useful if you are having problems with garbage collection and need to track how often it
is occurring. I highly recommend always monitoring “% Time in GC” as it is one of the best indicators of potential
garbage collection problems.

 .NET CLR Memory – % Time in GC: If your app spends more than 5% of its time in garbage collection,
you may want to review how object allocations are performed.
 .NET CLR Memory – # Gen 0 Collections: The number of times that garbage collection has occurred
for generation 0 objects.
 .NET CLR Memory – # Gen 1 Collections: The number of times that garbage collection has occurred for
generation 1 objects.
 .NET CLR Memory – # Gen 2 Collections: The number of times that garbage collection has occurred
for generation 2 objects.

Understanding Counter Instance Names


Monitoring performance counters can be really tricky. Many of them depend on knowing the name of the Windows
process or IIS’s w3svc name of your application.

Watch a short video on how to

13 What is the different generations of heap in .NET or Java and what is their significance

14 What is vertical scaling and horizontal scaling

Horizontal scaling means that you scale by adding more machines into your pool of
resources whereas Vertical scaling means that you scale by adding more power (CPU,
RAM) to an existing machine.
15 What is the relationship between throughput and response time

17 What is the significance of 90th percentile. What is 90th percentile? Would you use this
measure during your performance testing

18 What is standard deviation and explain its significance

Definition: The Standard Deviation is a measure of how response time is spread out around
the Mean. Simply say, the smaller the Standard Deviation, the more consistent the
response time.
19 What is garbage collection

20 What is a JVM

21 Questions on Monitoring tools

22 What is IP spoofing

23 Difference between webserver and Application server

24 What are Web services

25 Explain Web service Performance testing

26 what kind of Protocols worked in Load runner

29 What is difference between Performance testing and Performance Engineering and explain its
importance

30 What are exception handling mechanism used in Load runner

32 Explain Rendezuvous point and its use in load runner

33 Questions on Load runner analysis and test results

34 What is co-relation and types of correaltion in load runner


35 what is NFR and explain contents of it

36 What are pros & cons using HP Performance center instead of Load runner

37 Explain Goal oriented scenarios in Load runner and when we use it.

27 What are metrics you measure in monitoring tool and why?

Das könnte Ihnen auch gefallen