Can JMeter be used to perform Functional testing?
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:
- Use HTTP Cookie Manager to hold cookies, deal with cookie-based authentication, etc.
- Use HTTP Header Manager to send relevant headers like
User-Agent
,Accept-Language
, etc. - Use HTTP Cache Manager to represent browser cache
- 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.
Devarajan
Software Test Engineer in Mobax networks pvt Ltd, Coimbatore
Updated on June 04, 2022Comments
-
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?