What is the difference in testing file upload and download with FTP request and HTTP requests in Jmeter - jmeter

which is the actual way to test performance of upload and download files using JMeter tool ?

HTTP and FTP protocol are totally different, if your application supports both - you need to load test both methods as they are handled differently on the server side. Your load test needs to simulate what real users are/will be doing so check your application requirements prior to building the test plan.
For simulating HTTP uploads and downloads you need to use HTTP Request sampler
For simulating FTP uploads and downloads - go for FTP Request sampler. FTP protocol provides some more ways of files and folders manipulation, i.e. moving, deleting, listing contents, etc. so you may also need to perform these operations using Apache Commons Net libraries and JSR223 Sampler, check out Load Testing FTP and SFTP Servers Using JMeter guide for comprehensive explanation and example code snippets

Related

Requests to payment a gateway are failed from JMeter on cloud systems

I have a JMeter Test Plan (JMX) which simulates users placing orders and making credit card payments at the end.
The script works well when it runs from my machine. Requests to the payment gateway failed only when the script was executed from a third-party JMeter online service (e.g Redline13, Blazemeter, and Loadium).
The first request failed with the following error.
I have tried with several header configurations
Sending requests without any pre-defined headers
Setting user agent explicitly in Header Manager
Enabling Browser Compatible Headers in the HTTP Request
Also compared the requests generated from the third-party service provider and the requests generated from my machine. Also copied the headers and used them in the local machine.
It works well with the local machine but it continues to fail in the requests from the third-party services (Redline13, Blazemeter, and Loadium).
Any solution or direction is highly appreciated.
As per JMeter project main page:
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 the message is quite expected.
The fact that the script works on your local machine and doesn't work in the cloud most probably means that the payment gateway (or its mock) is not reachable from the Internet.
You can increase JMeter logs verbosity for the HTTP protocol by adding the next line to log4j2.xml file (lives in "bin" folder of your JMeter installation)
<Logger name="org.apache.http" level="debug" />
and compare jmeter.log files from local and cloud runs, it will contain request and response details which you will be able to compare and figure out what's different.

JMETER Record a scenario that contains calls using microsoft remote desktop protocol and check 3 party tool activity and come back to application?

My scenario is given as below :
I login into application and upload a doc file then request send to server where thrid party tool (doc to pdf)is running and convert doc file to pdf and send file conversion status pass\fail on application. Can i Record scenarion in JMETER that access microsoft remote desktop protocol and check third party tool activity and come back to application?
Thanks,
Raman
If you want to "record" the RDP protocol the answer is "no", JMeter's HTTP(S) Test Script Recorder can only record HTTP or HTTPS protocols, other traffic will not be recognized.
If you want to take some screenshots of the remote Windows machine you can use i.e. JavaRDP library from JSR223 Test Elements
If you need to read the conversion log and add it to JMeter test results it might make more sense to consider connecting to the machine using PowerShell Remoting from the OS Process Sampler.
Check out How to Run External Commands and Programs Locally and Remotely from JMeter article for more information on the concept and example configurations.

Offline PCAP to Jmeter JMX

Dears,
Any Idea of an offline replacement to https://converter.blazemeter.com/ to convert a PCAP to JMeter JMX.
As the PCAP contains sensitive data that we can not upload online.
I need an inhouse tool
Thanks
I can think of the following options:
You can use tcprewrite tool to replace the "sensitive" data with the dummy data in your .pcap file and use the aforementioned converter. Once you get the .jmx file you can replace the dummy data back with the sensitive data
If you want fully offline solution you can consider using tcpreplay application which can replay .pcap files via JMeter Proxy Server which will capture HTTP requests and create the relevant HTTP Request samplers.
You can open the .pcap file via Wireshark, copy raw TCP request data and put it to HTTP Raw Request sampler.

JMeter API Testing - Recording the Incoming Traffic

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.

Desktop based application recording in jmeter

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.

Resources