Recording scripts using HTTP Test Script Recording vs Blazemeter plugins - scripting

Just a simple question, which Jmeter recording method is better for the timebeing? Record script using HTTP Test Script Recording (using proxy) or Blazemeter plugins? Can provide justification for each?
Because at first I record with blazemeter plugins, when I tried to apply correlation, it never works. But then I try to record manual using proxy, my correlation works. I tried to correlate userSession in the webtours test application.
Mind if you can share your thoughts on that? In which scenario we have to choose scripting using Blazemeter plugins or proxy in Jmeter apps? Thanks!

Both basically intercept HTTP requests and convert them to JMeter's HTTP Request samplers
HTTP(S) Test Script Recorder requires extra steps like importing certificates, configuring proxy server, etc.
BlazeMeter Chrome Extension doesn't require any extra setup, however for certain POST requests it may add multipart/form-data where it's not needed
Going forward you can consider the following alternatives:
Correlations Recorder Plugin for JMeter - where you can add correlation rules beforehand and they will be automatically applied to the content substituting hard-coded values with the appropriate JMeter Variarbles, you will still have to perform correlation, but it will be one place only
BlazeMeter Proxy Recorder - which is capable of exporting recorded requests in "SmartJMX" mode with automatic detection and correlation of dynamic parameters (even including timestamps), but it requires Internet connectivity so if you're recording a local application you won't be able to use it.
If you're still interested in my "thoughts" I don't think that any "recording" solution can substitute a human, especially when it comes to more complex topics like simulation of AJAX requests so I would recommend using a 3rd-party sniffer tool to compare the network footprint from the real browser with JMeter's and amend JMeter configuration so it would be 100% accuracy.

Related

Load Testing with Selenium? What are the alternatives for my situation

Currently I'm trying to run a load test which walks through a uniquely created URL. I know JMeter is often used for load testing, but I was specifically asked to do it through something like Selenium that uses real browsers to create the URL then open that URL and complete the steps within the URL. I have created a Selenium script that can easily do this, but I need to do this 100 times concurrently and can't find a good way to do.
Is there a way to do this? I've looked into Selenium Grid but I'm not sure if I even have enough nodes to run 100 browsers concurrently. Please if you have recommendations for software or a different method of doing this I would love to hear it. Thank you!
JMeter can be integrated with Selenium using WebDriver Sampler so you can re-use your code and rely on JMeter's multithreading capabilities.
If one machine won't be powerful enough to kick off 100 browsers - you can consider going for Distributed Testing
In general be aware that browsers don't do any magic, they just send HTTP requests, wait for responses and render them. JMeter is not capable only of rendering the page, but if you need to load test the backend - it can mimic browser's network footprint with 100% accuracy, just make sure to configure JMeter accordingly in order to behave like a real browser
JavaScript execution time and page rendering speed can be checked either using single WebDriver Sampler or a separate solution like Lighthouse

Unable to get fingerprint in browser using Apache JMeter

I performed performance testing using Apache JMeter version 3.X.
At one of the step, I'm not able to get the browser fingerprint value. I receive NULL value and it cause my program to be terminated.
But when I'm using normal browser, it works find.
Is there any limitation on Apache JMeter where it cannot get the browser fingerprint value?
First of be aware that it's recommended to use latest version of JMeter so consider upgrading to JMeter 5.2 (or whatever is the latest stable version available at JMeter Downloads page)
With regards to the "fingerprint" itself, according to the main page of JMeter project:
JMeter is not a browser, it works at protocol level. As far as web-services and remote services are concerned, JMeter looks like a browser (or rather, multiple browsers); however JMeter does not perform all the actions supported by browsers. In particular, JMeter does not execute the Javascript found in HTML pages. Nor does it render the HTML pages as a browser does (it's possible to view the response as HTML etc., but the timings are not included in any samples, and only one sample in one thread is ever displayed at a time).
so you need to investigate the logic of this "fingerprint" check, you can make JMeter to behave like a real browser up to certain extent like:
use HTTP Cookie Manager to represent browser cookies
use HTTP Header Manager to send at least User-Agent and other headers which normal browser sends
etc.
however if the "fingerprint" check relies on JavaScript you will need to re-implement the same JavaScript using JSR223 Test Elements
The main rule is: the network footprint of JMeter must be exactly the same as network footprint of the real browser (apart from dynamic values which need to be correlated), if you will send proper requests using JMeter - your system under test will not see the difference.

Capture web driver network traffic across all browsers

I want to capture all the network calls from Web Driver in Java. I am not doing any UI testing, just testing JS execution and, requests and responses of some network calls.
I tried using Browser Mob as is suggested in most forums, but I need it to work across all browsers. It worked flawlessly with Firefox, but I was facing some issues with the others. Safari driver doesn't event support a Proxy capability.
I don't want to use Fiddler as it involves some manual steps around invoking and storing the calls. Whereas, Browser Mob being an in-code proxy can be integrated in a more smoother fashion.
I also tried using the RC-like package included in Selenium standalone server package. But, I have some HTTPS calls and some nested iframes in cross domains. I am particularly interested in some cross domain POST call and it doesn't work out that well. Also, people keep saying it's not recommended to use that package.
So, I had a solution where we can use a standalone proxy server running on a machine. Using host entries, we'll point Web Driver to hit the proxy instead of the actual server. The proxy will record all the incoming calls and route them to the actual server host. Later, I can make a request to the proxy which will return me all the calls it intercepted. I am not sure whether it's still called a proxy or a router.
I came across TCPmon, but it's no longer being supported. Does anyone know some similar tools that could run on Unix systems or any alternate solutions?
We modified the Fiddler rules script to include a new exec action. If you use their native script editor, it also provide auto complete features and we were comfortably able to get around it. The syntax is similar to that of JavaScript.
The Fiddler package comes with a ExecActions.exe which can be used to pass console arguments to a running Fiddler instance using the command prompt.
The code we wrote processed all the sessions captured by Fiddler and wrote it to a file in a custom JSON format and later used GSON to deserialize it.
Please let me know, if you want further details.

Converting loadrunner script to Neoload (using Fiddler maybe?)

Pretty much exactly what it says on the tin: I have a Loadrunner script and I would like to convert it to a Neoload one. There's no way to do this automatically, obviously, but my idea was to capture traffic created by a loadrunner playthrough and then somehow reroute it (or export it?) to Neoload, and then do the manual extraction/whatever later.
The answer given here gives some tantalizing hints on how to do it, but the problem is that I can't figure out how to get Neoload to accept anything other than manual recording (the answer is given for Webtest because Fiddler can export a Webtest file, but there's no such option for Neoload). Is there a viable way to make this approach work, or is there a different option I could explore?
NeoLoad records the HTTP traffic through a Proxy (default recording method). All you need to do is:
Tell LoadRunner to play the script through a Proxy: NeoLoad machine, port 8090 (default NeoLoad recording port)
Launch a NeoLoad recording (you can uncheck "Launch Browser")
Launch the LoadRunner playback of 1 VU
Stop NeoLoad recording
I hope this helps,
Christophe
Neotys
There no good conversion between the scripts.
Creating a script in that way would generate only the HTTP requests.
It would NOT generate:
1. Script changes (conditions, loops, etc)
2. Library attachments
3. Parameterizations
4. Validations
and extra stuff
Since Neoload 6.5.0 there is a new tool called
LoadRunner Converter.
The LoadRunner converter provides the capability to convert LoadRunner HTTP scripts to their NeoLoad equivalent for those organizations that currently use LoadRunner and want to move on to NeoLoad.
See:
https://www.neotys.com/neoload/whats-new

steps for recording the selenium events on jmeter proxy

I am presently working on a project for which selenium scripts are prepared and i want my jmeter proxy should record the steps executed by selenium browser. I tried running selenium and jmeter proxy server on same port but while doing that proxy server of jmeter refuse to start on same port. I read somewhere that this is possible but i am not getting the steps needs to follow.
You should do the same what you will do for simple test recording through Jmeter proxy:
setup Jmeter HTTP Proxy Server;
start configured Jmeter Proxy;
configure and enable proxy settings in your test browser (used by selenium) to use Jmeter Proxy.
Then run your selenium tests as usual, via configured test browser - HTTP Proxy Server will record execution.
To exclude all the steps performed in the "selenium-server" window try to add the following to 'URL Patterns to Exclude' in HTTP Proxy Server settings:
^/selenium-server/.*
Useful point here is to separate recorded execution into different Thread Groups - e.g. separate Thread Group in Jmeter for each recorded selenium testcase.
Step-by-step guideline you may found here.
To tell the truth such the "re-recording" may appear not very useful and effective: JMeter is not a browser, and does not interpret the JavaScript in downloaded pages.
As per Jmeter wiki:
JMeter does not process Javascript or applets embedded in HTML pages.
JMeter can download the relevant resources (some embedded resources
are downloaded automatically if the correct options are set), but it
does not process the HTML and execute any Javascript functions.
If the page uses Javascript to build up a URL or submit a form, you
can use the Proxy Recording facility to create the necessary sampler.
If this is not possible, then manual inspection of the code may be
needed to determine what the Javascript is doing.
So if you need Jmeter possibilities to implement load/performance-testing based on existent Selenium functional scripts better for you then use run Selenium scripts from Jmeter.