I am new to Jmeter testing. Last day my client asked me to test his website for load. I did a normal testing on it but now he wants a scenario where,
"I need to post both text & images with max no of concurrent users.
And also please do monitor the resource usage like how much Ram, CPU & Bandwidth consumption."
I need to find out how many active users can use the site cucurrently.
I referred this, JMeter - File upload and file download scenario but still I am not clear about it. May be because I am new to it.
But I need to login to the URL inhouse.net/redmine
Then I should go to the Home page inhouse.net/redmine/home
and the update profile photo there
How can I do this through jmeter?
Can someone please help.
Thanks!
Shari
Get the newest JMeter version from the site, and get JMeter plugins (Extras with Libs Set) from here. Once JMeter and the plugins are installed, you should take your time and read these:
JMeter user manual
JMeter best practices
About performance testing
The third one is really long, it should give you every detail on performance testing, use it only if something is not clear.
Then, you have to record your test steps (the http(s) requests from your browser that you want to simulate), a good guide on that is here.
For the scenario, I'ld use the ultimate thread group from JMeter plugins pack, and slowly increase the number of users from 1 to 1000. Measure how much time does it take for 1 thread (user) to complete the test steps. For example if 1 user takes 1 minute to finish, I'ld start a new thread every 1 minute, up to 1000. (check out timers for this).
You'll have to establish some KPIs, that reflect your needs, (in your case it's upload successful) check out the MSDN guide for more details on this. You'll have to implement these checks in your jmeter scenario (profile) using assertions, to determines if an upload was successful or not.
Don't forget to run your final test in command line mode. (with the -n paramter, no GUI)
For resource usage monitoring I recommend using dstat.
Related
I need your help, I have recorded a login script in blaze meter and importing it into JMeter what I noticed that browsing URL is repeating like site.com/0, site.com/1,site.com/2 and so on. Please suggest what to do to fix it asap help required. thanks.
I am trying to record a login script in blaze meter when I imported the script in JMeter I found that the browsing URL is repeating. like example.com/0, example.com/1,and so on. please help me.
We cannot "help" without knowing what are your expectations.
When it comes to performance testing of web applications you need to ensure that JMeter is properly configured to behave exactly like a real browser.
It means that JMeter should send the same requests and in the same manner as the real browser does.
In case if the network footprint generated by JMeter matches the one which the real browser produces - you don't need any "help" there. If it doesn't - we need to see:
the dump of requests from "Network" tab of your browser's developer tools
how did you configure the BlazeMeter Chrome Extension, i.e. choosing "Only top level requests" might "help" you
Normally these numeric postfixes are used as the naming convention for the Transaction Controller to all nested redirects, embedded resources and so on would be considered an integral part of the parent "transaction"
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.
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
I want to create a script in JMeter that simulates e.g. 100 users accessing our site over a period of 3-4 minutes.
We need to test whether our application can allow 25.000 users/day - that is 1.100 per hour.
For that i have made this Jmeter test:
and here is the result
and here is the graph
I want to know what this result is exactly telling us, if my test pass or fails, if yahoo.com (for which we have run this test for our example) can allow 25.000 users/day and if i am inputting my criteria / requirements correctly?
Thanks
1. I would advise to use better some custom samplers from jmeter-plugins instead:
Ultimate Thread Group: more flexible implementation of Thread Group allows to setup your load-testing scenario exactly how you want;
Response Times Over Time / Response Times vs Threads / Active Threads Over Time listeners: more demonstrative graphs as JMeter's default ones.
2. In addition to the #Qwe comment above: test not the single HTTP request but user's transactions: each test-thread should simulate a kind of real-user browsing activity: login (if any), navigating through the site, search, accessing/editing personal settings, logout, etc.
To emulate real-user add also "think-time" timer between transaction steps.
3. Control responses, at least the following:
response code of each user's request (# Response Assertion);
duration - to verify non-functional requirements for critical transactions (# Duration Assertion).
4. Look into corresponding JMeter documentation:
My boss wants me to load test our web app!
JMeter Wiki
5. Some step-by-step guidelines about Jmeter setup and usage for load-testing you can find here:
Load Testing your Applications with Apache JMeter
Using JMeter
Effective load testing with Apache JMeter
Load Testing with JMeter: part 1, part 2, part 3
A Simple Load Test with JMeter
Load Testing with Apache JMeter
Performance testing with JMeter
Your First JMeter Test
Some thoughts on stress testing web applications with JMeter: part 1, part 2.
UPD.
Please find, use and feel free to extend this Awesome JMeter collection continued on github.
I'm a newbie to jMeter, so please bear with me.
I've been assigned the task of testing how an e-commerce website responds under load. I've managed to set up basic tests in jMeter that basically just repeatedly visit the home page, but I'd like to simulate something a bit more realistic:
User arrives on home page
User goes to catalogue page
User views product
User adds product to cart
User returns to catalogue, selects another product, adds to cart
User removes first product from cart
User proceeds to checkout
User completes checkout process.
I'm having trouble finding adequate documentation to explain how to do this. I figured out that I need a cookie manager in my test so that the user session will be maintained, but I haven't figured out how to get the user to traverse the site in a realistic use pattern (such as the one described above). Can anyone help out with this, give me some pointers as where to look for good examples, etc?
This should be no problem, record or manually create the necessary steps as HTTP Samplers, then add them into a Runtime Controller for example to execute them iteratively.
The individual steps will be executed in the order they are in the tree and, in case Cookies are used to handle session state, you might need to add the Cookie Manager to the top of the tree which will handle cookie headers for each user.
Add some timers to simulate user's think time and scale up by increasing the number of virtual users in the thread group.
Use some listener like the Aggregate Report to view the response times for every step.
Try to read http://jmeter.apache.org/usermanual/index.html at first.
Also you'll encounter the problem that Jmeter can't process dynamic pages:
http://wiki.apache.org/jmeter/JMeterFAQ#Does_JMeter_process_dynamic_pages_.28e.g._Javascript_and_applets.29
Does JMeter process dynamic pages (e.g. Javascript and applets)?
No. JMeter does not process Javascript or applets embedded in HTML pages.
JMeter can download the relevant resources (some embedded resources are downloaded automatically if the correct options are set), but it does not process the HTML and execute any Javascript functions.
If the page uses Javascript to build up a URL or submit a form, you can use the Proxy Recording facility to create the necessary sampler. If this is not possible, then manual inspection of the code may be needed to determine what the Javascript is doing.