Load testing using Jmeter of Elastic Search API Queries through CSV - mongodb

Load testing using Jmeter of Elastic Search API Queries through CSV
I want to perform load testing using Jmeter of Elastic Search API queries which I will pass through CSV.
Please give me suggestions, what should be things I should Consider before doing that and what kinds of graphs that I should look in to, and what plugins should be installed in Jmeter

Get familiarized with the concept of web applications performance testing, load patterns, performance metrics, etc. See Performance Testing Guidance for Web Applications as an example reference material
Build your test plan "skeleton". Implement requests to web services endpoints using HTTP Request samplers. You may also need to add a HTTP Header Manager to send at least Content-Type header. See Testing SOAP/REST Web Services Using JMeter article for details.
Once done validate your script by running it with 1 virtual user and View Results Tree listener enabled. Check request and response details to see if your test is doing what it is supposed to be doing.
If your test works fine - add CSV Data Set config to your Test Plan and replace the values you would like to parameterize with the JMeter Variables originating from the CSV file
Repeat step 3 with 1-2 users to see whether your parameterization works as expected.
Now it's time to configure your load pattern (number of virtual users, ramp-up, test duration, etc.) and run your test
Analyze results using JMeter Listeners and/or HTML Reporting Dashboard

Related

Testing service session management via REST

I need to write test for some JAX RS web service that asserts that certain value is cached in the session from disk on the first request in the session.
The testing process does not have access to the tested process. The use case involves using REST API to invoke services.
I can think of several options to proceed with:
Create a REST endpoint just for testing, and query there the needed session value.
Write and then read a log message.
I am aware that I am trying to test an implementation detail via an external API which does not provide contract for this detail, but currently I'm a bit constrained about which processes may be run by the testing infrastructure.
Are there any additional seams to exploit for testing, and what general good practice exists for this scenario?
I just came up with the idea of changing the cached resource and using the change in the behavior.

How to measure performance/load time of dashboard charts?

I need to do performance testing over dashboard which contains different types of charts in a web page. All I have is JMeter now and I want to improvise the testing for dashboards / charts.
Kindly suggest me your ideas on how to do performance testing over multiple charts in a web page.
We are using Jasper Reports for data fetching and charts are made using JS components.
I need to measure the charts total load time of all the charts along with data i.e. I need to measure load time with complete UI loaded.
Thanks in advance.
First of all, have you seen Performance Testing with JMeter chapter? It explains how you can use JMeter for recording your scenario in browser and converting it into JMeter .jmx script.
JavaScript doesn't do any magic, it generates HTTP requests which can be intercepted with JMeter's HTTP(S) Test Script Recorder and replayed with increased load later on.
I would only suggest considering using Parallel Controller as AJAX requests are often being executed asynchronously (in parallel) and well-behaved JMeter test must act exactly like real user using real browser.

How to test load on Set of different API's

I am doing load testing in Soap ui and working on cab booking application so set api like this for example
userSingin ,GetlocationDetails,bookCab,getDriverDetails,acceptRide and completeRide so on.
It will become on loop(on completing of one ride successfully ) so this seniors may happened like 1000 or 10000 times.
The question is how to interlink api do it a single entity and perform load test using soap ui, jmeter or any load testing tools,or by coding please help me sort out problem with simple demo.
SoapUI has some load testing capabilities so given you have a functional test ready you can run it with increased load.
If SoapUI's load testing is not enough (i.e. you cannot create the desired load or find results not too verbose/informative) you can build the same test plan using JMeter's HTTP Request samplers. If you need to send custom Content-Type and SOAPAction headers - it can be done via HTTP Header Manager. See Building a SOAP WebService Test Plan article for more details.
Last but not the least, you can either execute existing SoapUI project using JMeter using Taurus tool, see SoapUI Support for more details on the specific feature and Navigating your First Steps Using Taurus to get familiarized with the tool and its concept.

Can I send multiple requests at one time using Fiddler?

Using Fiddler, I want to send multiple requests in one hit, to check the response time from the server, if too many requests are sent at one time. Basically, I want to perform a, kind of, load testing on my service. Is there any way to perform this action? I want to repeat the process of hitting the server, again and again.
In Fiddler, you can repeat a request as many times as you like by hitting SHIFT+R on the selected Web Session. You'll be prompted for a repeat count and then Fiddler will issue the specified number of requests.
Caveat: Having said that, generally speaking, you'd want to use a tool like Telerik Test Studio's Load Test tool for a task like this. Alternatively, you could use Fiddler's Export architecture to generate a script for VS WebTest or Microsoft's free WCAT tool and use those tools to generate the load. You can then run these scripts on multiple machines from multiple networks and generate a more-realistic set of load than you could by simply running on a single client.
I've been load testing with StresStimulus today. Overall, I'm quite impressed.
It's now a standalone application (it used to be a fiddler extension). There's a 7 day free trial which allows up to 50 virtual users. Also, the setup wizard is great for beginners.
For basic load testing the trial should be fine. Consider upgrading for extensive/professional use.

Stress testing with simulated browser behaviour

I tried JMeter and it's great but fails in what I need.
Basically I'm testing an ASP script that returns frameset to the client. When frameset renders it calls a couple of other asp scripts which render in separate frames. When I test this with JMeter I only get results for the output of the main script that renders first. JMeter is not behaving as browser would and is not trying to render the html that it receives, and therefore not requesting separate asp scripts and doesn't render them.
The application I'm trying to test is "Aquaforest Tiff server". And I need to know how much time it needs to load tiffserver, along with tiff images from the storage under large number of concurrent connections. Is there a way to actually simulate browser behavior and to render the script that is returned as a response and measure response times all together from start to end???
PS. If I was not clear enough, please tell me... I'll try to elaborate more if you don't understand what I'm talking about here...
Try Selenium or Google WebDriver. You can write unit tests to remote control Firefox and IE. We're doing that for integration tests and it works fine. Occasionally, i pimp one of the integration tests to run multi-threaded in loops for benchmarking.
Visual Studio Test Edition should do the trick for you. A Visual Studio web test recording will record that the page requested the sub pages as dependant http requests.
However, you can still simulate the load correctly, you just have to instruct JMeter to do the http requests for the dependant requests. To record the complete array of http requests made, try using fiddler2 to record. Fiddler2 also works to record visual studio web tests.
I found the 'Retrieve All Embeded Resources from HTML Files' option under HTTP Request and it does download resources that are more deeply nested...
But I don't think this solves my problem, because I have some resources that are downloaded with use of javascript. And I don't see them downloaded in the Results Tree. Am I right?