I'm trying to make load testing of my Telegram bot - jmeter

I'm trying to make load testing of my Telegram bot. So I tried to use HTTP(s) Test Script Recorder for that in JMeter and ran Proxy in Firefox for that, while did manipulations in my Telegram bot, but all that I had was just some random *.png files recorded in JMeter, which say me nothing and moreover, they came just ones and after records nothing, when I continue to work in the bot. When I record another sites request, everything is fine, but not Telegram. Read the following question and Rubycon says that there is only single Http Api request, but don't know which one and how to find that.
Telegram Bot load testig
Can somebody help with that?

If you want to use JMeter's HTTP(S) Test Script Recorder for recording Telegram network traffic you need to set Telegram to use JMeter as the proxy:
additionally you may need to install a special loopback adapter so Telegram wouldn't ignore local proxies and would be able to route traffic through them.
Also you will need to add JMeter's MITM certificate to Trusted Root Certification Authorities
More information: How to Run Performance Tests of Desktop Applications Using JMeter

Related

jmeter and Cloudflare : 1020 error ; works with Postman

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.

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.

How to use JMeter to record user input

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

Can we record desktop applications using JMeter

Could some one please help me on the below
Is it possible to record desktop applications using JMeter?
I just tried the following, but didn't work
File--->Template--->Create
Workbench--->Recording Script-->Start
Launched my application which is desktop and perform some actions
Workbench--->Recording Script-->Stop
When I expand Threadgroup--->Recording Controller-Nothing recorded
Where am I missing?
You miss one important step:
configure your desktop application to use proxy and provide host and port where JMeter is running (localhost and 8888 if they live on the same machine
Also be aware that:
JMeter can record only HTTP or HTTPS traffic, if your application uses other protocol - the calls will not be recorded. In that case you can consider The Grinder as an alternative, it comes with TCPProxy which is more low level therefore is cable to capture more protocols
If your application uses HTTPS protocol you will need an SSL certificate in order to decrypt and record the requests, you can configure your application to use JMeter's certificate or vice versa.
On MS Windows you may need to add a Loopback Adapter
See How to Run Performance Tests of Desktop Applications Using JMeter article for more details on simulating multiple desktop applications using JMeter
As help explains:
The recorder is implemented as an HTTP(S) proxy server. You need to set up your browser use the proxy for all HTTP and HTTPS requests.
Technically browser is also a desktop application, so to answer your first question, yes, you can record desktop applications using JMeter. However, just like browser, your desktop application must have an ability to connect to the internet via user-defined proxy. And also recorder will only record HTTP traffic from and to the application, it will not record client-only UI events, or traffic generated by any other protocols.
So to sum up:
Any desktop application can use JMeter recorder
But only if you can configure it to use JMeter recorder as a proxy
And only if your goal is to record HTTP traffic related to your desktop application, nothing else.

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