JMeter does not record any client server activity - performance

I am trying to record any client-server activity in JMeter as a start for learning. I am doing this from a company network and hence have to go through proxy. Below are the steps I took for recording.
I read in JMeter documentation that for recording through proxy I have to invoke from command by giving the proper proxy. I used below code to invoke JMeter.
jmeter -H "proxy address taken from Internet settings" -P "8080" -u "Domain*UserName*" -a "password".
With this JMeter invokes fine and then I start the normal process of creating a thread group and a recording controller.
Now I am changing the internet setting in IE to local host and mentioning the port as given in JMeter (8080). I am keeping the proxy used as it is because without proxy no site will open except for the internal company sites.
Also I have imported the certificate which JMeter uses for the browsers.

This is now resolved
I added : JAVA_HOME variable in User environment variables with value pointing to jre installed on my machine C:\Program Files\Java\jdk1.8.0_60\jre
Also I had to select Java under HTTP Sampler Setting in HTTP(S) Test Script Recorder. (Though I don't get the purpose of this setting).
HTTP Sampler setting changed to Java
After doing above changes script is recording fine under company proxy.

I would recommend you to consider to use chrome extension for jMeter script recording without launching JMeter benefits: You can export the script written to JMeter and/or to cloud as well and run it on the cloud.

Related

Jmeter Recording of scripts behind Proxy

I need to perform JMETER TEST and Record a WEB Login Page, my company is behind the proxy. If I change the proxy and port of the Firefox to 8080, My Application doesn't launch.
If I don't change the proxy in Firefox, Then the recorder doesn't record the script.
I tried with IE, Where due to corporate policy, I cant change the policy and it is disabled.
How I get out of this situation?
You need to keep Firefox proxy settings to point to JMeter's HTTP(S) Test Script Recorder, i.e. server name should be localhost, port should be 8888
In its turn JMeter needs to be configured to use your corporate proxy, it can be done in 2 ways:
Via command-line parameters, like:
jmeter -H your_corporate_proxy_host -P your_corporate_proxy_port -n -t ...
this way the change will be applied only once
If you want the changes to be permanent you can add the following lines to system.properties file (located in the "bin" folder of your JMeter installation)
http.proxyHost=your_corporate_proxy_host
http.proxyPort=your_corporate_proxy_port
https.proxyHost=your_corporate_proxy_host
https.proxyPort=your_corporate_proxy_port
References:
Using JMeter behind a proxy
Configuring JMeter
Apache JMeter Properties Customization Guide

jMeter on VM with no internet not finishing test

My company is trying to use JMeter in a VM (Windows Server 2003 :( )with no internet connectivity to hit another VM with a server set up and code running on IIS. I set up the ip address in my hosts file, let's call it server.dev for now. Our goal is to hit server.dev/doSomething When we go into IE and hit server.dev we get a response.
We use a keystore with JMeter and it says that it creates it correctly. In JMeter we have an HTTP Request where we hit the server.dev, and the path is set to /doSomething. JMeter then starts, and the log has no errors, but once it says "Creating the HTTPS Trusall Scheme" it hangs. When I put debug flags on it shows that it created the SOAP Request correctly and seems to send it out. The Headers should all be correct. It hangs here for about 1 minute and then shuts down with error with saying something along the lines of "Could not get response from server".
Does anyone have any ideas on where to go from here? I tried to debug for hours, but got nowhere. I can't seem to load up Fiddler to see the network traffic either, since there is no localhost set up.
Most likely that IE uses proxy and JMeter does not. Try other browser, i.e. Firefox (it doesn't respect system proxy settings if you won't import anything during installation) and if Firefox won't be able to establish the connection - my assumption is correct and you're sitting behind the proxy server.
There is a way to "tell" JMeter to use a proxy server, it is controllable via command-line arguments, to wit:
-H [proxy server hostname or ip address]
-P [proxy server port]
-N [nonproxy hosts] (e.g. *.apache.org|localhost)
-u [username for proxy authentication - if required]
-a [password for proxy authentication - if required]
See Using JMeter behind a proxy guide for details and Full list of command-line options for the full list.
You can also configure proxy settings in system.properties file (which lives under /bin folder of your JMeter installation), add the following lines to it:
http.proxyHost=your.proxy.ip.address.or.host.name
http.proxyPort=your.proxy.port
https.proxyHost=your.proxy.ip.address.or.host.name
https.proxyPort=your.proxy.port
And after JMeter restart everything should work as expected.
See Apache JMeter Properties Customization Guide for more information on JMeter properties and ways of setting and overriding them

How to record a script using jmeter for capturing the webservice requests that occurs between two applications?

How to record a script using jmeter for capturing the webservice requests that occurs between two applications ?
Check out https://www.digitalocean.com/community/tutorials/how-to-use-jmeter-to-record-test-scenarios. Specifically, the information on how to set up the proxy for Firefox. You have to make requests through a proxy at 127.0.0.1:8080 or localhost:8080.
Configure both applications or underlying application server, or underlying Java Virtual Machine or underlying operating system to use host, running JMeter as a proxy and it will record all the requests between applications.
You can use Load Testing Mobile Apps. But Made Easy guide as a reference.
For more information on JMeter Proxy Server configuration see:
HTTP(S) Test Script Recorder User Manual Entry
JMeter Proxy Step by Step PDF guide

Recording the script in Jmeter for Applications having Google map

I'm new to jmeter.I'm testing the webapp running in local network which is having google map in it.I want to record using the recording controller.
I have set the proxy in jmeter by
-H webproxyServer -P 80 -u username -a password -N localhost
and used the jmeter proxy server in Browser. I tried to record the script.But Google map is not loading in the application.Can anyone help in this?
You're misusing -H command line argument. It's required when your host doesn't have Internet connection and JMeter cannot access the website under test only via proxy.
There are 2 options available on how to record network traffic into JMeter .jmx file:
HTTP(S) Test Script Recorder + Recording Controller. See JMeter Proxy Step by Step guide for the detailed walkthrough.
Google Chrome JMeter Extension which allows JMeter scripts recording right from browser without needing to worry about proxies, SSL certificates, headers, etc.

Unable to record script using Jmeter

I am new to Jmeter and unable to record script using Jmeter. Eventhough I have followed the instruction provided by Apache.Jmeter.org. Pls update me with the few esay steps to move on.
Thanks,
Karthik.
If you are recording the script you can follow sequence,
Jmeter becomes your proxy and records everything between your real proxy and you so make proxy as localhost and port no as 8080 for http
if you are trying record a script for application running on proxy/local machine then above setup is enough
if you want to record script for a application on WAN then start jmeter like,
Jmeter - H "proxy which you are using" -P "port no" <-u "username" -a "password">
by default test plan is present when you start jmeter
add threadgroup and proxy recorder in script
start recording
If you have difficulties in setting up HTTP(S) Test Script Recorder (despite the fact it's perfectly documented in JMeter Proxy Step by Step guide you could try using Google Chrome JMeter plugin which allows JMeter scripts recording right from browser without needing to worry about proxies, browser extra configuration, SSL certificates, etc.
The most common error for using JMeter proxy is Do not use proxy for localhost / 127.0.0.1. If you have this or similar option in your browser make sure that it's disabled
I'm sorry, but the links are in spanish
http://josepablosarco.wordpress.com/2009/02/03/performance-testing-con-jmeter-paso-por-paso-para-grabar-escenarios/
http://carloszuluaga.wikidot.com/pruebascarga:grabar-script-web

Resources