Load testing 1000 users via blazemeter and jmeter but getting 1 user reflection in backend - testing

Let's say I am filling this form and recording it via blazemeter
and this is how its looking in jmeter for testing 1000 users
this is my backend and it's only reflecting one user
I am expecting 1000 differnt users here after load test on jmeter

If you recorded your test scenario using HTTP(S) Test Script Recorder it will contain credentials only of the user used during the recording process.
If you want to see 1000 different users - you need to:
Have 1000 different names/emails in i.e. CSV file
Add CSV Data Set Config and set it up to read the data from the CSV file
Replace recorded name and/or email with the JMeter Variable from the CSV Data Set Config
This way JMeter will read next line on each iteration of each virtual user and will post the data under the authority of a new user.

Related

how to export report using owasp zap session

Im trying to generate the zap report using the existing session. Im able to run the scan and save those sessions, with that session i need to create a report in either .html or .pdf
The below code can load the session, but report is not generating.
#!/bin/bash
ZAP_HOME="/Applications/OWASP ZAP.app/Contents/Java"
ZAP=${ZAP_HOME}/zap.sh
# Getting current timestamp to use it in the session name
timestamp="/Users/xxx/ZAP/January-19-12:50.session";
# Getting the report generated in HTML format
sh "${ZAP}" -daemon -quickout /Users/jijesh/report.html -session "$timestamp"
Using -quickout is only applicable if you've used -quickurl.
You can find ZAP's commandline reference here: https://www.zaproxy.org/docs/desktop/cmdline/
For specifics on the -quick* options see: https://www.zaproxy.org/docs/desktop/addons/quick-start/cmdline/
You can find more information about automation with ZAP here: https://www.zaproxy.org/docs/automate/
Really you should avoid using the -quick* mechanisms, they're the oldest and least flexible/useful of the ways to automate ZAP. You'd be much better off leveraging the Automation Framework or interacting with the API programmatically.

Capturing query duration using selenium & robotframework

I am using Selenium and Robotframework.
I want to:
submit multiple search values sourced from a csv file
capture the search result values and write out to csv file
capture the duration of the query
How do I do step #3?
Should I be looking to use HAR and parse that for the duration, or is there a way for selenium and robotframework to access this value for each query and write out to file?
You can do this with selenium: https://www.lambdatest.com/blog/how-to-measure-page-load-times-with-selenium/
Browsermob proxy (HAR) should help you measure the request time, especially of ajax responses: https://www.tothenew.com/blog/browsermob-proxy-for-webpage-load-testing-using-selenium/
However if you're just hitting one endpoint (with different requests), you probably want to look into a tool like jmeter: https://jmeter.apache.org/usermanual/glossary.html

How to create test suite for any broken images using machine learning based algoritham/ AI based Automation

I am working on a sizeable large eCommerce web-portal where, there are many images on thousands of CMS generated dynamic pages.
The location of the image on page is fixed.
How to create a Javascript / Machine Learning based test automation bot, which will skim through all of these pages & result in the pages where images do not load.
Time for this test run is not a constraint, as we won't be putting this run as CI/CD pipeline, rater a standard overnight run.
1 Start by fetching a page (load it in a browser, or make a HTTP request for it, depending if you need to wait for JS or not)
2 Find all tags, and store each one in a Set of toVisitPages
3 Find all tags on current page
4 For each tag on current page, make a HTTP request to it, does it 404? If so - add it to your broken list
5 Start at step 2) with the next page from toVisitPages

While running event API on Jmeter, the server is updating event on old time frame

What I am doing is, I have recorded a download event from APP on Jmeter, when ever i am running this API on Jmeter, a server where any download event is recorded, is showing OR increment that download on that specific time when it was recorded.
How can I use this to get updated data on server when Jmeter is running.
Also need some information on to how to add different valid users on Jmeter.
Thanks,
Abhi
My expectation is that you pass a hard-coded timestamp as a request parameter so you need to figure out the parameter value and substitute the hard-coded timestamp with __time() function which produces current time in different formats controllable via SimpleDateFormat patterns.
Check out How to Use JMeter Functions article for comprehensive explanation
In regards to adding valid users, normally people stick to users which already exist in the system and use CSV Data Set Config to give each JMeter virtual user unique credentials of the real user.
If your application doesn't have that much users you might want to setup a separate JMeter script to get them created as re-using one login with large number of threads is not a good practice.

LoadTesting in Jmeter

I wrote test case using selenium webdrive. also i use junit.
Now i want to test that test case for 100 + users.
So i use treads in that application, but i can go up to that much of users because my memory in not enough for that(open 100+ browsers).
So is there a way to test this in Jmeter.
I can't use badboy recording and import it to Jmeter because somehow my application doesn't support it. (the replay doesn't work in badboay).
Please help me to solve this problem.
Thanks
JMeter offers it's own recording solution - HTTP(s) Test Script Recorder. You can record your test case with it and then try to replay.
If you need to check only unauthenticated navigation, like accessing different pages by anonymous user it should work as a charm. However if you test assumes authentication (log in), creating or updating some stuff, etc. you may need to use HTTP Cookie Manager to deal with user authentication and Regular Expression Extractor Post Processor to fetch dynamic values from responses and add them to next request.
There are some more components you may wish to consider adding to make your test look like more realistic:
Add HTTP Header Manager - to set different headers like User-Agent, Accept-Language, etc. - what real browser does
Add HTTP Cache Manager - to simulate browser cache
Make sure that "Retrieve all embedded resources" property of HTTP Sampler is checked - to simulate parsing css, images, scripts, etc.
Make sure that "Use concurrent pool" is enabled and has size from 2 to 5 threads - as browsers download embedded stuff asynchronously in several threads
Make sure that you filter out external domains in "URLs must match" field - you unlikely want to load test Google Analytics or external banners or whatever