Can JMeter be used to perform Functional testing?

10,441

Solution 1

JMter can be used for functional testing for sure,please check the below sample for you to refer

http://www.packtpub.com/article/functional-testing-with-jmeter

http://www.testingminded.com/2009/02/tutorial-on-functional-testing-with_3268.html

Solution 2

Jmeter can be used as functional testtool, but there is a challenge in maintenance your JMX file.

For example you are having a jmx file with 30 threads (for each different scenario 1, but with the same modules but with different variables). The functional tests ran fine.

Now the next release will have a change in a module. Then you need change all 30(!) threadgroups that module!!

This kind of maintenance can be annoying.

Solution 3

Actually it's better to consider other tool for functional testing, for instance Selenium browser automation framework perfectly suits as it supports all modern browsers.

JMeter has one major limitation - it isn't capable of executing JavaScript. However if you need to proceed with JMeter please consider following techniques to make it behavior more like to real browser:

  1. Use HTTP Cookie Manager to hold cookies, deal with cookie-based authentication, etc.
  2. Use HTTP Header Manager to send relevant headers like User-Agent, Accept-Language, etc.
  3. Use HTTP Cache Manager to represent browser cache
  4. Consider using HTTP Request Defaults Configuration Element for
    • asking JMeter to retrieve embedded resources to simulate a browser retrieving embedded resources (such as gifs, css, js etc).
    • using thread/connection pool to simulate the browser parallel fetching (use between 2-4).

You will also need to properly handle JavaScript-generated AJAX calls by creating relevant HTTP Requests which will simulate XMLHttp calls.

Share:
10,441
Devarajan
Author by

Devarajan

Software Test Engineer in Mobax networks pvt Ltd, Coimbatore

Updated on June 04, 2022

Comments

  • Devarajan
    Devarajan almost 2 years

    I have used JMeter for performance testing of the web application. But I don't know how to use it for Functional testing.

    Can anyone help me?