How to measure performance/load time of dashboard charts? - 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.

Related

What is the difference between `next export` and `next build` in Next.js?

I have developed a web app that uses Nextjs app for the frontend and a Python (Django) API server as the backend. Most of my front-end pages have API calls to my backend server (in ComponentDidMount or in response to user actions like button clicks).
I want to deploy this app to my server. I am using Nginx as the reverse proxy. The backend deployment is sorted. I am confused about deploying the nextjs app.
After reading the docs I figured there are 2 ways to do this:
Run next build and then next start. This will start a nodejs server on port 3000. I can channel traffic to this port using Nginx.
Run next export. This will generate an out directory. I can channel incoming traffic to this directory using a reverse proxy like Nginx.
Which of the 2 options should I use? What are the differences?
Answering my own question with the help of the answer I received on the NextJS discussions forum link here
Basics of next build, start and export
next build builds the production application in the .next folder. You need to run this command irrespective of whether you want to run next start or next export.
After building, next start starts a Node.js server that supports hybrid pages, serving both statically generated and server-side rendered pages.
next export will export all your pages to static HTML files that you can serve with any host. This is similar to what create-react-app does, but you can still build dynamic pages at build-time with exportPathMap.
Note: Statically generated pages, using next export, are still reactive i.e. any dynamic JS code, which updates your pages at run time, will continue to run as usual (like any other ReactJS app). Next.js will hydrate your application client-side to give it full interactivity. Its just that the dynamic section of the page will only be rendered in the browser at run time and hence it won't be available to search engine crawlers.
When to use next export?
next export is recommended if you have some dynamic pages which need to some data to be fetched only at 'build' time. It is perfect for pages like landing pages, blogs, news articles etc, or for other kinds of pages which are updated only during code builds. You can setup a background task to build your code at regular intervals if your page data needs to be updated more frequently. This will speed up your 'first paint' speed and also provide the entire page data to search engine crawlers for indexing.
When to use next start?
If you do not need any data fetching at build time i.e. your pages are rendered dynamically at run time then you should use next build and then next start. This will also generate static HTML for sections of your page which are not dynamic. This will speed up the 'first paint' time of your pages. See this Automatic Static Optimization.
next export, also produces an optimized production ready build, but it builds fully static app, which means only html, css and javascript but no server-side code.
Since there is no server side code, you do not need a server to host your app. This makes hosting your app easier and cheaper because you dont need to maintain and scale a server. There are plenty of hosts in the market which offers very good pricing.
Since next export builds a static app, it means you cannot use api routes, server-side functions therefore you cannot revalidate. Revalidation means, your app will be checking database for a certain of time that you specify. Let's say you have a blogging app, you save your blog posts to database, with server side coe, you get those on server side, pass them to the client and client renders the posts and with revalidation option set, your app would automatically check the database if the content changed. Since you cannot use this feature, anytime content of your app changes, you have to redeploy your app.

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.

Load testing using Jmeter of Elastic Search API Queries through CSV

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

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?