JMeter recording for browser less application - jmeter

My web application doesn't uses browser. It is a MS Word plugin and uses port 80.
When I try to record on port 80, Jmeter says 'port already in use'
And if i set other port in my app, app doesn't work properly.
What to do in this case??
Thanks

If your MS Word Plugin has proxy settings - configure it to use JMeter's Proxy.
If it doesn't have its own proxy settings - it should respect system proxy configuration (usually it can be configured via Internet Explorer proxy settings)
You can use 3rd-party tool like Wireshark or Fiddler to capture the traffic and convert it to JMeter .jmx script.

The only way you can do it as I see it is not through script recording but by setting requests in jMeter manually and build whole test plan like this. It's not so hard anyway if you know how your plugin works and requests you send. Some short info can be find here:
http://jmeter.apache.org/usermanual/build-web-test-plan.html

Error message 'port already in use' means that port 80 was assinged to some other service. You can't assign that port to Jmeter proxy server to start. (Jmeter has to start its own service on some unused port)
a. Just start Jmeter on its default port 8080 (or some other unused port).
b. Redirect required traffic to Jmeter proxy port (i.e, 8080). MS office will honor System proxy settings, so change the IE proxy setting to server '127.0.0.1' port '8080', it should automatically apply to office.
c. Now all the HTTP requests trigger from Office should visible in Jmeter Proxy recorder. After that you can move them to required location in Test Plan.
As Dmitri Said, you can also use Fiddler to track the requests (Prefer Fiddler over Wireshark, for its ease of use).
Good Luck!

Related

Unable to capture traffic on proxy port for http url

I am running a Groovy script to capture traffic over proxy port in OWASP ZAP.
For https site, I am setting the proxy as given below and I can see the traffic in ZAP when I run my script.
System.setProperty('https.proxyPort', '8083')
System.setProperty('https.proxyHost', '127.0.0.1')
For http site, I am setting the proxy as given below but I can not see the traffic.
System.setProperty('http.proxyPort', '8083')
System.setProperty('http.proxyHost', '127.0.0.1')
The same settings although work fine when configured on Chrome. I have tried using the IP address instead of 127.0.0.1 but that also did not help. What could be going on wrong here ?

How to use JMeter to performance test using a laptop systems connected to a VPN instead of the internet

I would like to test the send/receive metrics when connected via a VPN using the JMeter tool then compare the results when not connected to the VPN. Would appreciate any thoughts on this subject.
I don't think there is something you have to do from JMeter perspective as traffic routing is the job for the VPN client so it should be sufficient just to execute the test 2 times:
1 test when the VPN connection is down
2 test when the VPN connection is up
The results can be compared using Merge Results Tool
If for some reason your VPN client doesn't pick up the traffic from JMeter to your application due to its configuration you can force JMeter to use your VPN network interface as the source IP address, the setting lives under "Advanced" tab of the HTTP Request Defaults configuration element

How to use multiple proxy with JMeter

I have a load balancer and I want to test the performance of the load balancer. I am using Apache JMeter to test the load balancer. I need to change my IP address so that the client IP is always different. My uni doesn't allow me to add multiple IP addresses (IP spoofing / IP alias).
So, the other option is to use a proxy server. Is there a way to use 2 or more proxy server in JMeter at one go? I can only specify one proxy server at a time at the moment.
Is there a way to turn it around?
You can use "Server name /IP" configuration in "HTTP Request" sampler. But those IPs should belong to same network. You cant set jmeter with different Geo locations.

I'm not able to record a script in Jmeter, script is not generating

I had follow all the below given Steps.
Please check and suggest me solution for this.
1.Create Thread Group.
2.HTTP Request(with Port 8080 and IP/Server Name as localhost.
3.HTTP Request Defaults(with Port 8080 and IP/Server Name as localhost).
4.Added Recording Controller.
5.Under Workbench created HTTP(s) Test Script Recorder
6.Updated URL patterns (.*.html).
7.Added View Result Tree.
8.Clicked on Start and install Root CA certificate(Click OK).
9.Set a Proxy in Firefox.
10.Firefox Option Advanced Network Setting.
Check the Manual Proxy Configuration.
HTTP Proxy: localhost and Port: 8080.
11.Check the "Use this Proxy Server for all Protocol".
No Proxy for "localhost".
Finally I have did not see any script that has been recorded.
You Can Follow these below steps:
Open Jmeter.
Click on Templates... (File->Templates... )
Just Click on "Create" button.
Then open up your Firefox browser.
Then Open Menu-> Options -> Advanced -> Network -> Connection Settings.
Then configure just like this.
Then just click OK.
Start the HTTP(s) Test Script Recorder from Jmeter.
9.Now Install Root CA certificate.
Restart your Firefox and you are just ready to record your test script.
You will find your recorded script under the "Recording Controller" section!!
Hope, this will help you. :)
It might be the case you're trying to record secure (HTTPS) traffic.
Make sure "Use this proxy server for all protocols" box is checked
Make sure "No Proxy for" box is empty
You can also consider an alternative recording approach - JMeter Chrome Extension - in that case you won't have to worry about proxies, SSL certificates, browser configuration, etc. - click one single button and you're all set.
- In step #2, You don't need to specify anything in HTTP Requests, HTTP requests will
be added automatically when you record your script successfully.
- In step #3, DO NOT use server name as "Localhost" and port number as JMeter's port.
Only when you want to test HTTPS domains, you specify HTTPS as a protocol.
Also, if you are testing an application that requires a specific port number (Example:
htts://somedomain.com:9595/somepath/) you specify the Server/IP Name and the PORT in the
HTTPS Default.
- In step #5, you specify JMeter port number (8080 or 8888 or...), and chose "Target
Controller" to "Use Recording Controller". You will find recorded script in Recording
Controller when you expand it after recording is done.
- In step #10, use the same port number you specified in step #5.
For me, the solution was to create an alias for 127.0.0.1 in /etc/hosts:
127.0.0.1 myserver
and create the JMeter script from the Recording template as detailed at https://jmeter.apache.org/usermanual/jmeter_proxy_step_by_step.html, specifying "myserver" as the host (instead of www.example.com).
Also, if your backend listens on a specific port, you have to specify that port in the "HTTP Request Defaults", under "Port Number".

Using Fiddler to debug the Windows Phone 7 emulator

I recently started using the updated beta tools for Windows Phone 7 and ran into an interesting problem. It seems that with Fiddler running, any Http requests run through the emulator start returning a null result and create a "not found" web exception. This is easy to reproduce with WebClient.DownloadStringAsync(). The old versions of the emulator did work with Fiddler if I remember correctly. Has anyone had luck getting the two to work together? If it's not possible I'd be open to any other tool that could help debug web requests from the WP7 emulator.
It looks like there is a blog post that describes getting fiddler working with Win Phone 7 through some customized rules for setting up Fiddler as a Reverse Proxy.
Here is a little bit of the instructions from the fiddler website, but the blog post seems a little clearer (sorry for wacky format, the block quote is not cooperating):
Option #1: Configure Fiddler as a
Reverse-Proxy Fiddler can be
configured so that any traffic sent to
http://127.0.0.1:8888 is automatically
sent to a different port on the same
machine. To set this configuration:
Start REGEDIT Create a new DWORD named
ReverseProxyForPort inside
HKCU\SOFTWARE\Microsoft\Fiddler
Set the DWORD to the local port you'd like
to re-route inbound traffic to
(generally port 80 for a standard HTTP
server) Restart Fiddler Navigate your
browser to http://127.0.0.1:8888
Option #2: Write a FiddlerScript rule
Alternatively, you can write a rule
that does the same thing.
Say you're running a website on port
80 of a machine named WEBSERVER.
You're connecting to the website using
Internet Explorer Mobile Edition on a
Windows SmartPhone device for which
you cannot configure the web proxy.
You want to capture the traffic from
the phone and the server's response.
Start Fiddler on the WEBSERVER
machine, running on the default port
of 8888. Click Tools | Fiddler
Options, and ensure the "Allow remote
clients to connect" checkbox is
checked. Restart if needed. Choose
Rules | Customize Rules. Inside the
OnBeforeRequest handler, add a new
line of code: if
(oSession.host.toLowerCase() ==
"webserver:8888") oSession.host =
"webserver:80"; On the SmartPhone,
navigate to http://webserver:8888
Requests from the SmartPhone will
appear in Fiddler. The requests are
forwarded from port 8888 to port 80
where the webserver is running. The
responses are sent back through
Fiddler to the SmartPhone, which has
no idea that the content originally
came from port 80.
I'm not able to get Fiddler to monitor the traffic, so I use WireShark, which works fine.

Resources