New Release of LoadRunner 12 version

The roadmap for LoadRunner 12 was presented at HP Discover Barcelona in December last year. Since that time, I've been lucky enough to have a beta copy of LR12 for evaluation purposes. Now that the product has been released, I'm able to share some of the new features that I've found to a wider audience.




Key observations / new features are:
Cloud-based load generators. HP describes this feature as "cloud bursting". Users now have the ability to provision load generators on AWS(Amazon Web Service) cloud servers from within LoadRunner or Performance Center. As well as this, the ports used to communicate between LoadRunner components such as Load Generators, Controllers, MI Listeners are user configurable through the new "network security manager" tool. This simplifies the setup process and allows more flexibility in distributed test networks or cloud-based test environments. It is even possible to configure different ports/proxies for each Load Generator.

Licensing - 50 vUsers free


We in the user community have been asking for this for a long time. Providing fully-functional applications that allow small-scale testing allow prolonged evaluations and proof-of-concept exercises. This is great, because it allows more people e.g. developers to get hands-on experience and see the potential benefits of using LoadRunner.

This is likely to improve the adoption rate for LoadRunner and prevent the erosion of market share to low-cost / no-cost providers of performance testing software.

All protocols are included in the "community edition" license, with the exception of GUI (UFT) and COM/DCOM protocols as well as those protocols in the "template" bundle (i.e. those vUser types whose scripts are manually created (rather than record/replay) such as C# .Net, VB .Net vUsers).

VUGEN improvements
There are a variety of improvements as you would expect. Key ones are:
The ability to review replay statistics for tests after each run.
Including details on total connections, disconnections and bytes downloaded.
The ability to edit common file types in the editor.
Support for recording in the Internet Explorer 11, Chrome v30 and Firefox v23 browsers.
The ability to create scripts from Wireshark or Fiddler files.
The ability to record HTML5 or SPDY protocols.

TruClient improvementsTruClient script converter. This basically replays your TruClient scripts and records the HTTP/HTML traffic allowing you to create these script typers from TruClient recordings. This is similar to recording GUI scripts and then converting to other script types.

The addition of support for Rendezvous points, IP spoofing, VTS2 and Shunra network virtualisation in TruClient scripts.

Linux Load Generator improvements
Building on the increased support for Linux Load Generators in 11.5x, LDAP, DNS, FTP, IMAP, ODBC, POP3, SMTP and Windows Sockets scripts can now be replayed through UNIX load generators.

CI/CD support
Better integration with Jenkins etc.

Platform support
Support for installation on Windows Server 2012.
(LoadRunner 11.x and PC 11.x only supported up to W2K8 which was a barrier to enterprise adoption).
LoadRunner components can now run in a "non-admin" user account with UAC and DEP enabled.

There are numerous other improvements which are well documented in the "About LoadRunner" section in LoadRunner help. Now that the community license is available, there's nothing stopping you from downloading it and giving it a go.

To get your own copy, navigate to www.hp.com/go/loadrunner and follow thre links to download LoadRunner. 


Source:  http://blog.trustiv.co.uk/(Bish)

Shunra in load runner

Shunra NV (Network Virtualization) for HP Software is the only HP-certified solution specifically designed to accelerate and optimize application performance testing across WAN, web, mobile and Cloud networks. Shunra NV for HP Software integrates seamlessly into HP LoadRunner and Performance Center, enhancing the accuracy of testing by incorporating production network conditions into the load and performance test environment.

Shunra NV for HP Software enables an effective application performance engineering methodology, providing the capabilities todiscover and then virtualize real-world network conditions in the test environment, analyze test results in order to isolate potential bottlenecks, and automatically deliver custom performance optimization recommendations.

Shunra NV for HP Software features easy configuration, requires no script editing and places no limits on test scheduling. In addition, test results and data are automatically stored with HP results files and segregated by emulated location for precise and actionable analysis.

From within the familiar HP Software interface, organizations can leverage Shunra NV for HP Software to:


Discover production network conditions and access Shunra's global library of mobile and broadband conditions directly from Performance Center and LoadRunner.
Enable each load generator in a test environment to emulate up to 100 different networks or locations, thereby reducing or eliminating reliance on remote load generators while also making it easy to configure multiple networks in a complex environment.
Allocate bandwidth per virtual user in a load test, a critical element for mobile app testing where bandwidth availability is dynamic and varies for each individual user.
Aggregate test results into a single database for ease and completeness of location-specific analysis.
Extend testing scripts with a single click.

Automate reporting and analysis for Performance Engineers, Line of Business Owners and other business constituents.

Because performance is the number one factor influencing application use and adoption, and ultimately business success, accurate and reliably predictive pre-production testing is a requirement. Shunra NV for HP LoadRunner and for HP Performance Center provides the capabilities needed to achieve this level of confidence with performance testing.

Shunra VE Desktop for HP LoadRunner

The only WAN emulation technology now featured and integrated directly within HP LoadRunner v9.5
Upgrade to HP LoadRunner 9.5 or HP Performance Center 9.5 and have access to Shunra's WAN emulator directly while load testing for the most successful performance testing results. Access to the only HP Certified WAN Emulation solution on the market that was co-developed by HP Software and Shunra offers new powerful benefits:

  • Enables each load generator to emulate a different network location
  • Eliminates the need to deploy load generators remotely
  • Aggregates end-to-end results into a single database
  • Replaces LoadRunner WAN Emulation (MWE), last seen in LoadRunner version 8.1 (released July 2005)
  • Achieves thorough performance testing with WAN Emulation
  • Makes existing testing scripts network-aware with a click of a button

WAN emulator is conducted on a per load generator basis. Since this is a co-developed solution, it is seamlessly integrated and intuitive to configure and use. There are no script edits required, no limits on test scheduling, and results are automatically saved within the scenario.

How does WAN Emulation work with load testing?
When configuring WAN Emulation within HP LoadRunner, there are no script changes required. For more advanced configurations, use the Network Editor capability to select advanced network settings no longer tied to a server. Key advanced testing options include:
  • Jitter and packet loss patterns
  • Asymmetric bandwidth
  • Congestion
  • Link Failures
  • Eliminate Global Load Generators
No need to install and manage load generators in remote offices around the world
Benefit directly from deployment of WAN Emulation with accurate user load testing
Ability to locally schedule, re-run or configure network aware testing
Enable scripts to act as if they are in any location

WAN Emulation with Load Testing is an Essential Best Practice
Defining a valid load test environment is complex. If the environment does not reflect real-world conditions it is probable that the results and decisions made to deploy the application will not be valid. Shunra's experience in helping customers maximize the effectiveness of their load testing process has shown that without incorporating the impact of the WAN on the production infrastructure, the results of load tests are usually incomplete. Use of Shunra WAN Emulation along with load testing enables the detection of:

Latency impact – Latency is the number one most significant network impact on applications today. It is also something that you have very little control over. Latency causes the transactions and sessions to stay open longer than they would on a LAN. Without incorporating the WAN effects of delay into a load test, memory usage, thread usage, and other critical server resources can be significantly understated.

Bandwidth limitations – Bandwidth limits how much data can be transferred in a certain amount of time. Its constraints affect transactions "in-flight" causing them to take longer to complete and impacting important server resources.

Network impact – Where specific response time goals are being targeted, it is important to incorporate the overall effect of the network into testing to examine the impact on total response time.

Shunra enables you to accurately assess total response time for remote users prior to deployment, and can analyze the breakdown of total response time into the client, network, and server components.

This enables users to diagnose and resolve transactions that will not consistently meet your response time goals.

Connection Timeout Error:Failed to connect server in load runner

" Error -27796: Failed to connect to server "test.propertyinstant.com:80": [10060] Connection timed out " this error.
Solution:
Go to Run time settings->Preferences->options, there in HTTP properties you will find on option "HTTP-request connect timeout" set it to 1000 and then re run it will not fail after this.

Please make sure that manually you are able to connect to server. If not then there is a problem with server.

TRY:


HTTP-request connect timeout (sec).......1000
HTTP-request receive timeout (sec)........600

HTTP Keep-Alive timeout (sec)................600

whats new in HP Performance Center 12?

Businesses and clients are looking for faster delivery of applications than ever before, but still require a gold standard of quality. Built with the customer in mind, Apps 12 enables customers to deliver applications with unprecedented velocity, while maintaining first-rate quality and performance. Apps 12 provides the ability to build, test and deliver at all levels of scale; adding unparalleled flexibility necessary to support the wide range of technologies and environments that encompass the new style of IT. In pressing times for customers to produce faster and better than ever, HP provides application development and testing teams a partner in which to guide them through these ever-changing demands.

In addition to speed, delivering a successful app is an enterprise’s top priority. An application’s performance largely determines its success and whether or not the app will be used. If it doesn’t work properly, it will not provide users with any end benefits. To ensure an app’s performance is up to par, it is essential to test its performance properly. With HP LoadRunner and Performance Center software, the market-leader in performance engineering and load testing, users have the #1 tool to test their app’s performance thoroughly and accurately. In version 12, a multitude of enhancements were made to its testing capabilities focused around cloud, mobile and continuous testing. Read on as we dive deeper into each type of testing.



Cloud Testing:

In version 12, HP Performance Center and HP LoadRunner leverage public cloud infrastructure to deploy LoadGenerators (LGs). Users can seamlessly scale up and down tests based on performance testing needs or requirements, without complicated network configurations. With the utilization of cloud testing and the ability to elastically scale up tests, the demands of customer-centric business applications are met with ease and accuracy. As a result, enterprises can significantly reduce cost and lower the overall overhead of managing dedicated infrastructure.

With cloud based LGs, HP LoadRunner and Performance Center significantly reduce the provisioning time of performance testing, while maintaining the same level of security and control. Specifically in LoadRunner, users can add multiple cloud accounts and manage their network profiles for connecting to their various LGs. With Performance Center, existing cloud accounts can be managed centrally via Lab Management, and LGs can be allocated to individual projects. In addition, users can provision hosts and manage their usage with the built-in reporting feature.
Mobile Testing:
In the latest version, users can now test any mobile application, whether it is built in-house or by a third party, on any platform. Users have more flexibility with mobile testing than ever before. This means fewer applications will go untested, and a wider variety of mobile clients can be covered in each test scenario.

Version 12 also allows testers to test performance the way they need it, with the most complete and realistic mobile performance testing capabilities to date. With the growth of the mobile application market, including realistic network conditions is critical to understanding how the app performs. HP LoadRunner and Performance Center are integrated with Shunra Network Virtualization to provide users with complete control over their network conditions during testing. Other benefits and enhancements of Shunra Network Virtualization include:

Improved Integration with HP software to enable you to perform network virtualization per virtual user group and to define multiple locations per load generator

New network virtualization graphs for monitoring and analysis
Added support for shared or non-shared bandwidth that simulates mobile networks

Continuous Testing:

In version 12, testing performance early and often is the name of the game. LoadRunner provides users with the tools and APIs to introduce performance testing earlier in the application lifecycle. The REST API’s automatically trigger performance tests to be done from CI/build systems, and matched against service level agreements (SLAs) for consistent updates. By leveraging unit tests and automated testing processes, users are able to provide early feedback to the developers, which keep the lifecycle from falling behind.

The Performance Application Lifecycle (PAL) feature in Performance Center allows for complete end-to-end testing and DevOps feedback. Users can accurately compare performance test results with real production data benchmarks gathered from HP Application Performance Monitoring products. Analysis of these results provides important feedback that can help users fine-tune their performance test scenarios to resemble realistic environments as closely as possible, which reduces test assumptions and risks.

Correlation in JMeter

What is correlation and why it is required?Correlation is the most important aspect of scripting. It generally includes fetching dynamic data from preceding requests/calls and posting it to the subsequent requests.

Let’s take an example,Suppose we have recorded a scenario in which

  1. User enters login details and click OK button
  2. Home page opens and user take further actions
Now, if we just playback this script, the test will fail even for a single user. This is because of the authentication mechanism used. When we login to a website, session variables are dynamically created. These session variables are passed to the subsequent requests and help validation and authentication of the actions performed. So, one cannot just record and playback the requests having these variables. Here, we need to correlate the web requests with the dynamic variables. And for correlation, we need to use the “Regular Expression Extractor” which makes use of regular expressions.

A brief insight to regular expressions:

Regular expressions are used to fetch data from a string based on a search pattern. Basically, what we do is- in order to extract any value (generally a dynamically created value) from a string (text response), we define a left bound of the variable then some wildcard characters and then right bound-
(Left Bound)(Wildcard Characters)(Right Bound)
E.g. for if we have text response like-
.......__EVENTVALIDATION"value="weriudflsdfspdfusdjfsisdpfjpsdfohsdihffgdfgdfgdfgdfgdfgdfglsdjkfpjspdfjsdjfpj" />…..
And we need to extract the value of Event validation variable using regular expressions; the regular expression for the same will be-
__EVENTVALIDATION" value="(.+?)" /> where, Left Bound = __EVENTVALIDATION" value="
Wildcard characters = (.+?)
Right Bound = " />
If you do not want to get deeper into regular expressions, then the wildcard characters (.+?) would suffice in most of the cases. For more information on regular expressions and meaning of each wild card character visit http://www.regular-expressions.info/tutorialcnt.html.

Regular Expression Extractor:Coming back to JMeter, consider an example where we have two operations-
1. User launch website
2. User fill details and click on OK button
Now, the call user launch website creates a dynamic variable event validation that we can check in Response Data tab of “View Result Tree” listener for the call. The value of this variable is then passed to subsequent call related to “User fill details and click on OK button” as Http post parameter.

Steps for correlating the Event validation values:1. Run the script containing the both the above stated operations
2. Go to Response tab (Text mode) in “View Result Tree” listener of “User launch website” operation. BTW, we see the second operation “User fill details and click on OK button” in red because it is not yet correlated.





3. Create a Regular expression for extracting the value of Event validation variable’s value. As stated above the R.E. for this will be-
__EVENTVALIDATION" value="(.+?)" />

4. Go to http request under “User Launch Website” transaction controller-> Add -> Post Processor -> Regular Expression Extractor.


Adding “Regular Expression Extractor” control



R.E. Extractor Parameters Filled

5. The reference name inserted is the name of the variable created that will capture the value Event validation generated by the http request under “User launch website” operation.

6. Now pass this variable to the subsequent http request under “User fill details and click on OK button” as post request- overriding the already present hardcoded value of Event Validation variable.


Request without correlation (Hardcoded values)



Request with correlation (Dynamic values)

7. Run the Test plan again. All green? That's it.

This was all about correlation. In order to get good understanding of correlation (or scripting for that matter) we need to have a good understanding of two things- the dynamic variables generated by the programming languages and Regular expressions.

Extract single string in regular expression extractor in Jmeter correlation

Extract single string

Suppose you want to match the following portion of a web-page: 
name="file" value="readme.txt"> 
and you want to extract readme.txt . 
A suitable regular expression would be: 
name="file" value="(.+?)">

The special characters above are:

  • ( and ) - these enclose the portion of the match string to be returned
  • . - match any character
  • + - one or more times
  • ? - don't be greedy, i.e. stop when first match succeeds

Note: without the ?, the .+ would continue past the first "> until it found the last possible "> - which is probably not what was intended.

Note: although the above expression works, it's more efficient to use the following expression: 


name="file" value="([^"]+)"> where
[^"] - means match anything except "
In this case, the matching engine can stop looking as soon as it sees the first " , whereas in the previous case the engine has to check that it has found "> rather than say " > .
Extract multiple strings

Suppose you want to match the following portion of a web-page:
name="file.name" value="readme.txt" and you want to extract both file.name and readme.txt .
A suitable reqular expression would be:
name="([^"]+)" value="([^"]+)" 
This would create 2 groups, which could be used in the JMeter Regular Expression Extractor template as $1$ and $2$.

The JMeter Regex Extractor saves the values of the groups in additional variables.

For example, assume:
Reference Name: MYREF
Regex: name="(.+?)" value="(.+?)"
Template: $1$2$


Do not enclose the regular expression in / /

The following variables would be set:
MYREF: file.namereadme.txt
MYREF_g0: name="file.name" value="readme.txt"
MYREF_g1: file.name
MYREF_g2: readme.txt


These variables can be referred to later on in the JMeter test plan, as ${MYREF}, ${MYREF_g1

JMter interview questions

What is Jmeter?Jmeter is one of the Java tools which is used to perform load testing client/server applications. It is open source software Designed to load test functional behavior and measure performance of the application.It was originally designed for testing Web Applications but has since expanded to other test functions

What are the other applications tested by Jmeter? JMeter may be used to test performance both on static and dynamic resources (files, Servlets, Perl scripts, Java Objects, Data Bases and Queries, FTP Servers and more)

What do you see when you open jmeter?By defaultTest Plan & Workbench are seen

What is Test Plan in Jmeter?Test plan describes a series of steps JMeter will execute when run.
A complete test plan will consist of one or more Thread Groups, logic conrollers, sample generating controllers, listeners, timers, assertions, and configuration elements.

What is Work bench?The Workbench is simply an area to store test elements while you are in the process of constructing a test.
The Workbench is a sandbox for any test or portion of a test that you are working on.
When you are ready to test what you have designed in the Workbench, you can copy or move the elements into the Test Plan.

It also contains Non- Test Elements
Http mirror sever
Http Proxy server {which is not available in the thread group & Test plan }

What is Thread Group?

Thread group elements are the beginning points of any test plan.
All controllers and samplers must be under a thread group.
Listeners, may be placed directly under the test plan, in which case they will apply to all the thread groups.
The controls for a thread group allow you to:
Set the number of threads
Set the ramp-up period
Set the number of times to execute the test

What are the parts of thread group?Sampler :Sends various types of requests to the server
Listeners : Results of the Run can be viewed & saved
Timer : Makes th erun more realistic by inserting delays between the requests
Controller : responsible for controlling the flow of the thread group.If we have defined request to be executed on some logic like if-then-else or loop structure in java
Config Element : Info about the requests are added to work with samplers using this.
Assertion : To check if the responses are within given time and containing expected data.

What are Controllers and its types? JMeter has two types of Controllers

  • Samplers Controllers 
  • Logical Controllers

Samplers Controllers
Samplers tell JMeter to send requests to a server.
For example, add an HTTP Request Sampler if you want JMeter to send an HTTP request. You can also customize a request by adding one or more Configuration Elements to a Sampler.

Logical Controllers
Logical Controllers let you customize the logic that JMeter uses to decide when to send requests.
Logic Controllers can change the order of requests coming from their child elements.
For example, you can add an Interleave Logic Controller to alternate between two HTTP Request Samplers.

What is Configuration element?A configuration element works closely with a Sampler

Configuration elements can be used to set up defaults and variables for later use by samplers.
Note that these elements are processed at the start of the scope in which they are found, i.e. before any samplers in the same scope.

Its elements:

CSV Data Set Config: Used to read lines from a file, and split them into variables.
HTTP Authorization Manager : You can specify one or more user logins for web pages that are restricted using server authentication
Java Request Defaults: You can set default values for Java testing
HTTP Cookie Manager: The Cookie Manager element has two functions:
It stores and sends cookies just like a web browser.
Second, you can manually add a cookie to the Cookie Manager.However, if you do this, the cookie will be shared by all JMeter threads
HTTP Request Defaults: This element lets you set default values that your HTTP Request controllers use.
HTTP Header Manager : The Header Manager lets you add or override HTTP request headers

What are Listeners?A listener is a component that shows the results of the samples .The results can be shown in a tree, tables, graphs or simply written to a log file

The Graph Results listener plots the response times on a graph.
The “View Results Tree” Listener shows details of sampler requests and responses, and can display basic HTML and XML representations of the response.Other listeners provide summary or aggregation information.

Every listener in JMeter provides a field to indicate the file to store data to.They also provide means to view, save, and read saved test results.

How did you go about fixing a performance issue?Set up JMeter to reproduce the production like scenario to put through concurrent requests and put the system under heavy load. Used a profiling tool to monitor CPU times, memory usage, etc.

What are some of your recent accomplishments?Reduced the response time from 4 seconds to 2 seconds. Set up JMeter to put the system under peak load. Used a profiling tool to monitor CPU times, memory usage, etc. Identified the bottle neck, and improved the situation by fixing the offending database connection leak, back tracking regular expression, and a badly constructed SQL query with Cartesian joins.

What are Pre-Processor and Post-Processor elements? In what order does JMeter process various type of elements?A Pre-Processor executes some action prior to a Sampler Request being made. If a Pre-Processor is attached to a Sampler element, then it will execute just prior to that sampler element running. A Pre-Processor is most often used to modify the settings of a Sample Request just before it runs, or to update variables that aren’t extracted from response text.

A Post-Processor executes some action after a Sampler Request has been made. If a Post-Processor is attached to a Sampler element, then it will execute just after that sampler element runs. A Post-Processor is most often used to process the response data, often to extract values from it.

A Regular Expression Extractor can be used as a Post-Processor element to extract values to be used elsewhere in subsequent requests.

How do you ensure re-usability in your JMeter scripts?
Using config elements like “CSV Data Set Config“, “User Defined Variables“, etc for greater data reuse.
Modularizing shared tasks and invoking them via a “Module Controller“.
Writing your own BeanShell functions, and reusing them.

Does Jmeter generate any scripts? How to use the Jmeter tool and also the How to analyze the results?
When you create a test in Jmeter, save the file. The file saves with the extension .jmx.
Open the .jmx file in an editor. There you can see script.

For what purpose Jmeter used?

Jmeter is a Performance Tool. It is used to test the performance of the application. Apache JMeter is a 100% pure Java desktop application designed to load test functional behavior and measure performance. It was originally designed for testing Web Applications but has since expanded to other test functions.

Can we Parametrize via Jmeter?
Yes, you can parametrize via CSV file, User define variables or XML sheet.

How did you go about fixing a performance issue?A. Set up JMeter to reproduce the production like scenario to put through concurrent requests and put the system under heavy load. Used a profiling tool to monitor CPU times, memory usage, etc.

 What are some of your recent accomplishments?A. Reduced the response time from 4 seconds to 2 seconds. Set up JMeter to put the system under peak load. Used a profiling tool to monitor CPU times, memory usage, etc. Identified the bottle neck, and improved the situation by fixing the offending database connection leak, back tracking regular expression, and a badly constructed SQL query with Cartesian joins.

What is distributed load testing? How can it be achieved in JMeter?Ans. Distributed load testing is the process using which multiple systems can be used for simulating load of large number of users. The reason of using more than one system for load testing is the limitation of single system to generate large number of threads (users).
In JMeter we can do distributed load testing using the master slave configuration.
[For complete steps to perform distributed load testing refer to the post- Distributed load testing in JMeter]

How can we reduce the resource requirement in JMeter?Ans. To make the best out of the available resources and in general as a practice, following practices should be incoroprated in the tests-

Use non-GUI mode: jmeter -n -t test.jmx -l test.jtl
Use as few Listeners as possible; if using the -l flag as above they can all be deleted or disabled.
Don't use "View Results Tree" or "View Results in Table" listeners during the load test, use them only during scripting phase to debug your scripts.
Rather than using lots of similar samplers, use the same sampler in a loop, and use variables (CSV Data Set) to vary the sample. Or perhaps use the Access Log Sampler. [The Include Controller does not help here, as it adds all the test elements in the file to the test plan.]
Don't use functional mode
Use CSV output rather than XML
Only save the data that you need
Use as few Assertions as possible
[ source: http://jmeter.apache.org/usermanual/best-practices.html]
What is Spike testing and how can we perform it in JMeter?Ans. Suddenly spiking or increasing the number of users at certain point of application and then monitoring the behavior at that intervals is spike testing.
In JMeter spike testing can be achieved using Synchronizing Timer. Synchronizing timer blocks the threads until a particular number of threads have been blocked, and then release them at once thus creating large instantaneous load.

What all activities are performed during performance testing of any application?Ans. Activities performed-
1. Create user scenarios
2. User Distribution
3. Scripting
4. Dry run of the application
5. Running a load test and analyzing the result

What is 90% line in JMeter?Ans. The aggregate report listener have 90% line as one of the metric. The Apache JMeter manual describes 90% line as- “90% of the samples took no more than this time”. It is actually the 90 percentile of the response times of the samples -
90 percentile = (90/100)*N+1/2 where N is the number of samples
So, if there are 10 samples then 90%line will be 9.5 or 9. It means the 9th value in the sorted list of samples (sorted according to ascending order of their response times) will be the 90%line value.

 What is BlazeMeter?Ans. BlazeMeter is a cloud based service compatible with Apache JMeter. It generates large amount of instant load and provide very comprehensive reporting and analysis features.
In Blazemeter we can just upload the JMeter script and run the load test on cloud with predefined number of users.
 What is correlation?Ans. Correlation is the most important aspect of scripting. It generally includes fetching dynamic data from preceding requests/calls and posting it to the subsequent requests.
[For more details, refer to the post- Correlation in JMeter]

Explain parameterization in JMeter?Ans. Parameterization is process of generalizing some user input, so as to use it for multiple users or executions.


What are the protocols supported by JMeter?A: The protocols supported by JMeter are:

Web: HTTP, HTTPS sites 'web 1.0' web 2.0 (ajax, flex and flex-ws-amf)
Web Services: SOAP / XML-RPC
Database via JDBC drivers
Directory: LDAP
Messaging Oriented service via JMS
Service: POP3, IMAP, SMTP
FTP Service
Q: List some of the features of JMeter.A: Following are some of the features of JMeter:

Its free. Its an open source software
It has simple and intuitive GUI.
JMeter can load and performance test many different server types: Web - HTTP, HTTPS, SOAP, Database via JDBC, LDAP, JMS, Mail - POP3
It is platform-independent tool. On Linux/Unix, JMeter can be invoked by clicking on JMeter shell script. On Windows it can be invoked by starting the jmeter.bat file.
It has full Swing and lightweight component support (precompiled JAR uses packages javax.swing.* ).
JMeter store its test plans in XML format. This means you can generate a test plan using a text editor.
It's full multi-threading framework allows concurrent sampling by many threads and simultaneous sampling of different functions by separate thread groups.
It is highly Extensible.
Can also be used to perform automated and functional testing of your application.
Q: What is a Test Plan in JMeter?A: A Test Plan defines and provides a layout of how and what to test. For example the web application as well as the client server application. It can be viewed as a container for running tests. A complete test plan will consist of one or more elements such as thread groups, logic controllers, sample-generating controllers, listeners, timers, assertions, and configuration elements. A test plan must have at least one thread group.
Q: List some of the test plan elements in JMeter.A: Following is a list of some of the test plan elements:
ThreadGroup
Controllers
Listeners
Timers
Assertions
Configuration Elements
Pre-Processor Elements
Post-Processor Elements
Q: What is Thread Group?A: Thread Group elements are the beginning points of your test plan. As the name suggests, the thread group elements control the number of threads JMeter will use during the test.
Q: What are Controllers and its types?
A: JMeter has two types of Controllers:
Samplers Controllers : Samplers allow JMeter to send specific types of requests to a server. They simulate a user's request for a page from the target server. For example, you can add a HTTP Request sampler if you need to perform a POST, GET, DELETE on a HTTP service

Logical Controllers : Logic Controllers let you control order of processing of Samplers in a Thread. Logic Controllers can change the order of request coming from any of their child elements. Some examples are: ForEach Controller, While Controller, Loop Controller, IF Controller, Run Time Controller, Interleave Controller, Throughput Controller, Run Once Controller.
Q: What is Configuration element?A: Configuration Elements allow you to create defaults and variables to be used by Samplers. They are used to add or modify requests made by Samplers.

They are executed at the start of the scope of which they are part, before any Samplers that are located in the same scope. Therefore, a Configuration Element is accessed only from inside the branch where it is placed.
Q: What are Listeners?A: Listeners let you view the results of Samplers in the form of tables, graphs, trees or simple text in some log files. They provide visual access to the data gathered by JMeter about the test cases as a Sampler component of JMeter is executed.

Listeners can be added anywhere in the test, including directly under the test plan. They will collect data only from elements at or below their level.
 What are Pre-Processor and Post-Processor elements?A: A Pre-Procesor is something that will happen before a sampler executes. They are often used to modify the settings of a Sample Request just before it runs, or to update variables that are not extracted from response text.

A Post Processor executes after a sampler finishes its execution. This element is most often used to process the response data, for example, to retrieve particular value for later use.
Q: What is the execution order of Test Elements
A: Following is the execution order of the test plan elements:

Configuration elements
Pre-Processors
Timers
Sampler
Post-Processors (unless SampleResult is null)
Assertions (unless SampleResult is null)
Listeners (unless SampleResult is null)
Q: How do you ensure re-usability in your JMeter scripts?A:Using config elements like "CSV Data Set Config", "User Defined Variables", etc for greater data reuse.

Modularizing shared tasks and invoking them via a "Module Controller".
Writing your own BeanShell functions, and reusing them.
Q: Are the test plans built using JMeter OS dependant?A: Test plans are usually saved in thr XML format, hence they have nothing to do with any particular OS. You can run those test plans on any OS where JMeter can run.
Q: What are the monitor tests?A: Uses of monitor tests are:
Monitors are useful for a stress testing and system management.
Used with stress testing, the monitor provides additional information about server performance.
Monitors makes it easier to see the relationship between server performance and response time on the client side.
As a system administration tool, the monitor provides an easy way to monitor multiple servers from one console.

What are JMeter Functions?
A: JMeter functions are special values that can populate fields of any Sampler or other element in a test tree. A function call looks like this:${__functionName(var1,var2,var3)}

Q: Where can functions and variables be used?A: Functions and variables can be written into any field of any test component.
Q: What are regular expressions in JMeter?A: Regular expressions are used to search and manipulate text, based on patterns. JMeter interprets forms of regular expressions or patterns being used throughout a JMeter test plan, by including the pattern matching software Apache Jakarta ORO.
Q: How can you reduce resource requirements in JMeter?A: Below are some suggestion to reduce resource requirements:
Use non-GUI mode: jmeter -n -t test.jmx -l test.jtl.
Use as few Listeners as possible; if using the -l flag as above they can all be deleted or disabled.
Disable the “View Result Tree” listener as it consumes a lot of memory and can result in the console freezing or JMeter running out of memory. It is, however, safe to use the “View Result Tree” listener with only “Errors” checked.
Rather than using lots of similar samplers, use the same sampler in a loop, and use variables (CSV Data Set) to vary the sample. Or perhaps use the Access Log Sampler.
Don't use functional mode.
Use CSV output rather than XML.
Only save the data that you need.
Use as few Assertions as possible.
Disable all JMeter graphs as they consume a lot of memory. You can view all of the real time graphs using the JTLs tab in your web interface.
Do not forget to erase the local path from CSV Data Set Config if used.
Clean the Files tab prior to every test run.