Is there any way No Correlation need for JMeter Script? - jmeter

Is there an script recorder for JMeter (jmx) in which No Correlation is NOT needed. Just like "TruClient" Protocol in LoadRunner.
The script created with TruClient does not require any Correlation.
Thanks

There are few options available.
Please check
JCorrelate
video demo
Blazemeter Auto correlation Plugin
Detailed article
Naveen has explained the process in this video
Ubik auto correlation plugin for

TruClient is not a "protocol", LoadRunner just launches a real browser (a headless one) and controls it.
JMeter equivalent would be WebDriver Sampler, if you're looking for recording solution for Selenium the options are in:
Selenium IDE
JMeter Chrome Extension
However be informed that real browsers are quite resource intensive, for example Firefox 95 needs a CPU core and 2 GB of RAM per instance so for 100 users you will need 101 CPUs and 200 GB of RAM which is kind of expensive.
Moreover:
As per WebDriver Sampler introduction
Note: It is NOT the intention of this project to replace the HTTP Samplers included in JMeter. Rather it is meant to compliment them by measuring the end user load time.
As per Selenium documentation
Performance testing using Selenium and WebDriver is generally not advised. Not because it is incapable, but because it is not optimised for the job and you are unlikely to get good results.
So I would recommend keeping your test on HTTP protocol level without browsers involved, if you have problems with implementing correlation - take a look at BlazeMeter Test Recorder capable of exporting recorded scripts in "SmartJMX" format with automatic detection and correlation of dynamic parameters.

Related

Measure load or performance testing of GUI web applications

We are using JMeter to perform load testing of apis. If want to perform load or stress testing on web application which has JavaScript rendering, would JMeter with Selenium only option or any other options can be utilized like Selenium functional tests integrate with any performance tool.
Please suggest.
Have gone through/referred to this questions:
How to approach "end-client" performance testing on single-page (web) applications?
You can choose to use Selenium but it's hard to generate high load using selenium based test. You can choose to run two performance tests in parallel
Back-end Performance test: Use this to inject load on the back-end. Record Network traffic for the journey steps using JMeter proxy. Take out third-party and static urls, which are not relevant to load test.
Front-end performance test: Use this to measure end-user impact. Use between 1 - 5 virtual users in this test. Generating load is not important in this case, so you can use low amount of virtual users in this case. You can either use selenium based load test, webpagetest.org or similar tools.
This approach is more efficient than the selenium based performance test because selenium based load test will require very high amount of compute resources to scale.
If you use taurus to run your perf test then it should make it easier to run two JMeter tests in parallel using bzt scenario1.jmx scenario2.jmx
Hope this helps.
Depending on what you're trying to achieve and how many machine power you have you can consider:
Running Selenium tests in parallel using Selenium Grid but in this case:
you will need to ensure to have enough CPU, RAM, etc., i.e Firefox 72 needs 1 CPU and 2 GB of RAM per single browser instance
you will not have HTTP protocol specific metrics (Connect time, time to first byte, time to last byte, etc.) and load test specific metrics (active threads over time, transactions per second, etc)
Conducting the main load using JMeter HTTP Request samplers (just make sure to properly configure JMeter to behave like a real browser) and have 1-2 threads running WebDriver Sampler to collect client-side performance metrics i.e from Performance object

JMeter with Selenium WebDriver Sampler actually overload the overload PC

I run test in Jmeter with Selenium WebDriver Sampler
on Linux X86 and java SDK 11
The test run with 50 users.
I run it from the command line with non Gui mode and with Chrome headless mode.
but after 5 minutes the CPU going up to 100% and the memory almost full (8G).
What can I do to improve it?, I need run the test with 200 users and up.
Thanks,
Izik
You're expecting too much from your machine.
Although there are no specific RAM requirements defined at the Chrome System Requirements page, on my machine a single Chrome instance with a single tab in "porno" mode consumes almost 1GB of RAM. And this is given http://example.com page open, not modern web application with tons of JavaScript
I bet if you run the following command on your machine - you will get at least 3GB
(Get-Process chrome | Measure-Object WorkingSet -sum).sum
As per WebDriver Sampler tutorial
Note: It is NOT the intention of this project to replace the HTTP Samplers included in JMeter. Rather it is meant to compliment them by measuring the end user load time.
So my expectation is that you should be conducting the load using HTTP Request samplers and forget about using real browsers (or use 1 instance to collect client-side performance metrics). Just consider following recommendations from How to make JMeter behave more like a real browser article to ensure that protocol-based JMeter test has the same network footprint as real browser produces.
If you have to use real browsers for performance testing you won't be able to launch 200 browser instances on a machine with 8GB of RAM, you will have to find another 30-40 machines of this specifications and go for Distributed Testing.
This is expected, Since you are using Selenium it will use the JVM and browser which will consume a lot of memory. I would suggest you to distribute the test in multiple machine if you are going the Selenium route for load testing. This way you will be able to load test for more more number of users.
The best would be to stick to HHTP sampler as suggested above. You could also record and make necessary changes.

My Jmeter Webdriver sampler test is too heavy on my machine. I'm planning to use selenium grid, with selenium grid ,will it make my test more lighter?

My Jmeter Webdriver sampler test is too heavy on my machine. I'm planning to use selenium grid, with selenium grid ,will it make my test more lighter? As of the moment while running my test on gui and non gui mode I'm encountering a web driver timeout , connection timeout, and an out of memory error. Will this approach help?
Have you tried to read WebDriver Sampler's documentation?
Note: It is NOT the intention of this project to replace the HTTP Samplers included in JMeter. Rather it is meant to compliment them by measuring the end user load time.
You should not be creating the main load using WebDriver Samplers, 99.99999% of the virtual users should be simulated on HTTP protocol level, WebDriver Sampler could be used only for specific use cases like OAuth login, checking client side performance, etc.
Check out How to make JMeter behave more like a real browser article to learn how to properly setup JMeter for web applications testing so it would generate the same network footprint as the real user using the real browser.
If your have a form of a strict requirement to use the real browsers - consider switching to Distributed Testing as in case of Selenium Grid you will not be able to collect samplers execution metrics precisely.

Angular 4 performance & stress test

I am looking for a way to performance and stress test my SPA.
I prefer an open source(free) tool to do so.
I have searched quite a lot(https://www.blazemeter.com/blog/how-load-test-ajaxxhr-enabled-sites-jmeter) about the possibility to use Jmeter but i am still not sure if it is possible as this is an SPA and Jmeter works on the protocol level.
JMeter is not a browser as such it will not:
play URLs called through javascript.
report time taken in UI by javascript to display it
But the good news is that you can record all requests at HTTP protocol level,
all requests will be nested inside a Transaction Controller.
JMeter will play them sequentially and not in parallel.
So:
response time will be sum of Main + child requests response time
Load simulation will not be highly impacted as parallelism due to load testing will be simulated
There is also JMeter Webdriver Sampler that allows you to use a Real Browser
So by combining both approach you should be able to:
- Simulate load on your target application
- Have an idea of User Experience response times through JMeter Webdriver Sampler
You can install both plugins using JMeter-Plugins plugin manager plugin.
Note there is a 3rd party plugin that provides parallel execution if you want the parallel execution but I'm not sure it's needed:
https://github.com/Blazemeter/jmeter-bzm-plugins/blob/master/parallel/Parallel.md

Apache Jmeter response time too high for web pages

We are using Apache JMeter for the performance testing of web application. Apparently response time is too high in comparison to loading page in browser during load. When we open the page during load it opens in 2 seconds however JMeter reports 70 seconds. I understand browser memory cache and disk cache are used in browser however isn't JMeter cache manager does same. How to assert it, comparing response header is one option. Any thoughts on this will be appreciated.
It may be wrong configuration in the script. There won't be much difference between web browser and Jmeter response times (browser rendering time is ignored in Jmeter, not a big factor but must be considered)
If you are using single Http Sampler for a web page and retrieving all resources in tha page, then select "Parallel Downloads" option to '6' in Http sampler advanced section. So, you are simulating the browser behaviour of parallel downloading of the resources like .js, .css, images etc.
If you recorded the script using Test Script Recorder, then there will be an Http Sampler for each resource requet for that page which will be sent sequentially, hence increase in response time. You might be in this case, as of now, there is no feature/option to send the http samplers in parallel. so I suggest using the approach of adding one sampler, use parallel download of resources option in Http Sampler advanced section.
Also, caching is an important factor which decides the response time. Adding Http Cache manager can solve the issue in jmeter. This simulates browser behaviour of caching. I don't think there will be huge difference b/w browser and jmeter in implementing caching althought may not be perfect.
The reason could be the lack of resources on JMeter machine or JMeter not being properly configured for producing high loads. JMeter default configuration is good for load tests development and debugging, you can run load tests up to certain amount of virtual users, but if you need to conduct a really high loads - you need to perform some configuration changes.
First of all, double check my guess using jvisualvm and your operating system monitoring tools (there is PerfMon JMeter Plugin which can be used for monitoring different metrics on application under test and JMeter load generators sides). If it is the case - take the next steps to get the most performance of your JMeter installation:
Increase JVM Heap Size, NewSize, switch to ConcurrentMarkSweep Garbage Collector.
Run your test in non-GUI mode.
Disable all the listeners during the test.
Follow other recommendations from 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure article.

Resources