New to Jmeter so I am not sure if my set-up is correct.
Basically I have these set of API's that I need to Perf test. Starting with a setting up a basic connection from Jmeter - I am receiving 1020 error from cloudflare
Access denied | "domain" used Cloudflare to restrict access
and
<div class="cf-alert cf-alert-error cf-cookie-error hidden" id="cookie-alert" data-translate="enable_cookies">Please enable cookies.</div>
It works with POSTMAN. So wondering what changes I'll need in jmeter.
I have enabled save cookie in jmeter.properties file
API is for logging into a portal: verified username/password. VPN connection verified as this works from postman.
If you're absolutely sure that the request works in postman (although I'm getting this 1020 error even with the real browser) you should be able to get the same behavior in JMeter as well, just make sure to send the identical request (pay attention to HTTP Headers as well)
The easiest is just recording your Postman request using JMeter's HTTP(S) Test Script Recorder, just configure Postman to use JMeter as the proxy
and run your request - JMeter will generate appropriate HTTP Request sampler and HTTP Header Manager
If you need to use VPN for proper access you might need to configure source IP address at the "Advanced" tab of the HTTP Request sampler like it's described in Using IP Spoofing to Simulate Requests from Different IP Addresses with JMeter article
In any case load testing an API behind Cloudflare might be not the best idea as Cloudflare provides DDoS protection and may (and will) block this type of traffic so you need to either whitelist your IP address(es) or let them know about your load testing activities, I believe they will be able to suggest a better workaround than anyone here
This is related with the securities features of CloudFare, either DDos protection or bot blocking. Exceptions can be configured from the CloudFare control panel.
If you don't have access to this panel you'll have to ask the corresponding person inside your company tasked with this job.
Related
I've used Gatling and Siege to load test my application. However, at certain points (especially when my load is higher), I would get a lot of gateway and requestTimeoutException errors. Since the requests doesn't seems to even get to the app, I presume the issue is to be my IP address being blocked due to the influx of traffic from 1 IP address. How do you overcome this? I'm assuming that the users that Gatling and Siege create to send concurrent requests are all under the same IP of my machine?
This is not possible for Gatling, the relevant feature request has been closed, you might want to consider using Apache JMeter instead, JMeter's HTTP Request sampler has "Source IP" field where you can put the needed IP address or alias
More information: Using IP Spoofing to Simulate Requests from Different IP Addresses with JMeter
I am writing load test script for an SAP-based application in jmeter. I am getting 500 internal Server.
I saw that the request looks same which I have on the browser network tab and the one I provided in JMeter. The only difference is in the request header, that I am not providing any SAP-passport in my request. I am not to see the SAP-Passport in the response of any previous request's response so that I can extract that and use in future requests.
Please tell me if I am assuming correctly that the SAP-Passport is the issue, if yes then how can I get that and use in the request. Also if there is a way to get any static SAP-Passport.
Its a blocker for me and its on priority, please help.
As far as I can see from Single Sign-On with SAP Passports article it is a matter of adding a client certificate to JMeter.
Obtain SAP Passport root certificate somehow (i.e. export it from your browser)
Add it to JMeter. This can be done in 2 ways:
Using SSL Manager
Using JMeter system.properties file
Check out How to Set Your JMeter Load Test to Use Client Side Certificates guide for comprehensive instructions on both approaches.
How to record user input parameters using JMeter? I tried to use the record controller and follow through the tutorials, all the records are only http get requests without any post input. Thanks
Properly configured JMeter captures all network activity between browser and application under test, the fact you don't see POST requests might indicate one of the following:
Browser simply doesn't make any POST requests, i.e. your application is designed to operate only GET HTTP Request types
Your JMeter configuration is not correct, i.e. your application uses HTTPS. In this case you need to perform some extra configuration so JMeter could intercept, decrypt and record HTTPS requests:
make sure your browser is configured to use proxy for all protocols
make sure you install JMeter's self-signed certificate to your browser. The file name is ApacheJMeterTemporaryRootCA.crt and it is being generated in "bin" folder of your JMeter installation when you start JMeter Proxy Server
More information:
HTTP(S) Test Script Recorder (pay attention to HTTPS recording and certificates chapter)
Recording HTTPS Traffic with JMeter's Proxy Server
Using JMeter, the HTTP Request is hitting a URL with the port.
Eg : apitesting.com:8888/api/series/one
I have also added a HTTP Test Script Recorder in JMeter, where I can mention the port and domain.
How do I import the incoming traffic to JMeter using tcpreplay and JMeter Proxy for the above example.
Thanks for your help in Advance.
Have you read the FAQ?
Does tcpreplay support sending traffic to a server?
If by server you mean a daemon (Unix) or service (Windows) which listens on a port (a web or mail server would be common examples), then probably not. The biggest issue is that tcpreplay doesn't understand the state of common protocols like TCP. This means it is unable to synchronize Syn/Ack's to create valid TCP sessions.
So you have the following options:
Consider using Wireplay tool instead
Convert your .pcap file into JMeter .jmx script using BlazeMeter JMX Converter
In both cases be aware that you will get only a "skeleton" of the project, you won't be able to replay production traffic, all you will get would be a set of HTTP Request samplers, you will have to figure out the workload model on your own.
In JMeter you can add to your HTTP request a Post Processor Named Response Assertion, If you check the Ignore Status checkbox you will ignore response of the server so even if server is down it'll not fail test and continue.
I have a desktop based(.exe) application used for trading of equities.
1.Developed in VB uses TCP/IP.
2.Uses a database server which is an another server which the exe sends requests on.
3.I want to get the entire response using jmeter for 50 users at a time.
I wanted to record the responses for the transactions.I have worked with web applications where we create Http proxy server and start it and the recording happenes from browser but in this case i cant use browser.
Please guide me how to record the responses in jmeter with .exe applications.
Thanks and Regards,
Kumar
JMeter HTTP(S) Test Script Recorder is capable of recording only HTTP or HTTPS traffic so if following conditions are met:
Your .exe application talks to server using HTTP
Your .exe application can be configured to use HTTP proxy or respects Windows global HTTP Proxy settings from registry (or configured in Internet Explorer)
the answer is "yes", you can use JMeter to record the traffic. See Load Testing Mobile Apps. But Made Easy. guide for details on how to do it.
If one of above conditions cannot be satisfied there are following options available:
If you still want to use JMeter there is a possibility to use a sniffer tool like Wireshark to capture requests and manually construct them using JMeter HTTP Request or TCP Sampler.
Consider switching to Grinder tool which offers TCP Proxy
Hope this helps.