Jmeter : How to perform load testing on AngularJS based web application? - angularjs

I am unable to perform load test angularjs based web-application. Please share suggestion and example if there is any.
If we can not perform load test on angularjs using jmeter then please suggest any tool or any approach.
Thanks!!!

Load testing tools are backend-agnostic, to wit they don't "know" anything regarding underlying technologies stack of the web application.
Just remember one simple requirement: load test must represent real life application usage. It means that each JMeter thread (virtual user) need to impersonate a real user using a real browser and accessing your application.
Real browsers in their turn don't do any magic, they just send HTTP Requests and render the responses. JMeter doesn't actually "render" the response, JMeter waits for the response and measures the time taken.
So the answer is YES, you can use JMeter (as well as any other testing tool) for load testing an Angular web application, just make sure that load pattern generated by JMeter matches the one which real browser generates.
The most tricky thing is implementing AJAX requests, due to their asynchronous nature they're incompatible with JMeter threads model therefore if your application relies on AJAX technology you will need to precisely mimic AJAX calls as well. You can use Parallel Controller for this (Parallel Controller is not an integral part of JMeter distribution, it's a plugin which can be installed using JMeter Plugins Manager)

Related

Load testing Silverlight Application

We wanted to perform load testing of a silverlight application. We only need to test for max of 50-75 users
Wanted to get inputs if we can use JMeter and if yes, how can we go about it.Also, please do suggest if there are any other possible alternatives and cost associated with them.
You cannot load test Silverlight application with regular HTTP samplers as the protocol is binary and needs to be decoded before being able to:
variabilize
correlate
In order to do so, you would need to develop a plugin for this technology which might not be easy.
Some interesting elements:
http://jmeter.apache.org/usermanual/jmeter_tutorial.html
http://jmeter.apache.org/usermanual/component_reference.html#Java_Request
http://jmeter.apache.org/usermanual/component_reference.html#JSR223_Sampler
Alternatively, you could have a look at other solutions.
Silverlight runs on client side therefore I don't see a lot of sense in load testing it as it will always have only one user.
If your Silverlight application assumes a backend and you need to know if the backend is capable of handling 50-70 concurrent users - you could use JMeter for this. In the absolute majority of cases Silverlight applications use SOAP web services for communication between client application and the backend and SOAP is something JMeter naturally supports via its HTTP Request sampler, check out Building a SOAP WebService Test Plan User Manual chapter for more details.
Alternative options are in:
If your Silverlight application functions are exposed to JavaScript you could use JMeter's WebDriver Sampler to kick off real browsers, invoked functions methods and render the results.
Alternative to JMeter would be HP LoadRunner which seems to support Silverlight up to certain extent (not more than JMeter doesn however) and is free up to 50 concurrent users.

separating environments for concurrent users using JMeter & selenium webdriver

How can I separate environment for each JMeter thread using webdriver to test ASP.net website? I am trying to login (using different users with table file) and the tests fails because the cookies that saved from one thread (i.e browser window) interrupting the other threads.
Normally JMeter threads (virtual users) don't share any data, see ThreadLocal concept for more details.
When it comes to WebDriver Sampler each JMeter Thread should kick off a separate browser instance hence there should not be any clashes as each browser should be tied to a different user having its own credentials, cookies, cache, etc.
In general I would recommened reconsidering your test design, according to the WebDriver Sampler documentation:
Note: It is NOT the intention of this project to replace the HTTP Samplers included in JMeter. Rather it is meant to compliment them by measuring the end user load time.
Browsers are very resource intensive so it is unlikely you will be able to kick off more than 10 browsers using mid-range laptop while using HTTP Request samplers you will be able to mimic several hundreds or even thousands of virtual users. So I would recommend creating the main load using HTTP Request samplers and use 1-2 WebDriver Sampler instances to measure page rendering speed while system is under the load.
See ASP.NET Login Testing with JMeter article for more information on testing ASP.NET web applications using JMeter.

How to do performance testing for multiple user using Chrome Dev Tool for angular JS Web Site

I have developed an Angular JS Web Console. Web Console is basically creating, deleting, retrieving and deleting Users.
I want to do its performance testing using Chrome Dev Tool or Jmeter
If I use Jmeter how can I actually monitor the behavior of web console itself because from Jmeter I can only check the response time of API.
If I use chrome dev tool then how can I test it for multiple users against post and get operations.
For Example I have a Scenario that 10 Users are registering or signing in at a time. How can I test this behaviour.
OR
50 Persons are creating or deleting or retrieving a user using a form at a time.
OR
What will be the behavior of web console if 50 users are using web console at a time.
NOTE: Web Console is deployed on server. I want to test it locally and on server as well.
Need help. Thanks in advance!
Server side performance and client-side performance are different beasts so you can break down your performance testing requirements into 2 major parts:
Conduct the required load onto your web console using JMeter HTTP Request samplers. Make sure you configure JMeter properly to handle cookies, cache, headers, embedded resources (scripts, styles, images). See How To Make JMeter Behave More Like A Real Browser article for comprehensive explanation with regards to how to configure JMeter properly. If you need the requests to be fired in exactly the same moment of time also consider Synchronizing Timer
As JMeter neither actually render pages nor executes client-side JavaScript you can check client-side performance using one of below approaches (or any combination)
Using YSlow software
Using aforementioned Chrome Dev Tools
Using WebDriver Sampler (which provides Selenium and JMeter integration) so you will be able to measure page rendering time. If necessary you can add custom scripting logic using Navigation Timing API to get some extended information on page loading events in automated manner

Google App Engine, Load Testing on the Appspot server

I am a beginner in GAE and still evaluating if I should use this for my school project. I need to show that how an application can be scalable, the definition I wanna use here is whether it can serve 1000s of users concurrently.
Now load testing is one way of doing it. But load is futile when Google will scale out the application to a number of different instances depending on the load.
So hence, I am thinking of simulating data store read/writes access memcache etc to show the scalability prospects of the application.
Now, using JUnit Test is a good way to do this. But they can only be run locally. Is there a way to run them on the server, the actual production environment? If that can be done, then I can just write these tests and execute them via eclipse and I should be done!
The other way is to use functional testing with selenium to simulate the load and actual user conditions but this would most probably crash my computer and also not be concurrent.
The other option is to use a python load testing script and use sample json data to throw requests at the server urls. This however I tried but I cant test the options where genuine user interaction is needed since the live site requires a google sign in.
Any ideas where do I proceed to?
Look at either Siege (http://www.joedog.org/siege-home/) or JMeter (http://jmeter.apache.org/) for doing remote testing of your apps. The problem is though that you will hit the limit of your actual testing machine before you hit the limit of what you're trying to test so a lot of people spin up a few EC2 instances and run the load tests from there. Seige is very simple, it just reads a list of urls from a text file and clobbers the server as hard as you tell it to. JMeter lets you create more robust tests that can do things like log into a server and log more fine grained details about how your app behaves.
Those are the two best free and easy to use tools out there (IMHO).
It sounds like you really want to simulate datastore operations.
You can write a HTTP request handler that loads your junit tests and calls them, then either dump the results to log or as the HTTP result.
If they take a long time to run, you can run them on a backend instance.
Along the lines of Rick's suggestion, you can also probably run a test on a backend instance that makes HTTP requests to your frontend instances using the async HTTP API, and cause your front end instances to do a lot of work, if that's what you need to simulate.

extjs clarification

In this link: http://www.sencha.com/blog/spotlight-ext-js-customers/
Please scroll to the section :Why We Chose Ext JS
There is this line :
By using Ext JS, we lowered the cost
of developing a Web services API.
But I do not really get the explanation. How cost of developing a Web services API can be lowered by a client side framework?
I don't think the explanation conveys what the author intended. I think they were enthusiastic about ExtJs's AJAX APIs, which are easy to work with and can be called using a number of GUI components (which they mention).
The AJAX and component APIs do not create a server-side Web service API for you though, which their testimonial leads you to believe by saying:
This gives us the benefit of exposing
these same AJAX (JSON) calls, as a
Web services API, to our customers...
By using Ext JS, we lowered the cost
of developing a Web services API.
Well not quite, ExtJs doesn't create a Web Services API for you; it creates a method of interacting with your custom REST (or whatever) API. Although maybe they meant that since ExtJs defines how the client should interact with the server, via their numerous components, their server-side services were easier to create. For instance, ExtJs makes it easy to work with REST webservices, and it defines expectations in callbacks, etc. So in ExtJs providing the client solution, it was easier to devise a server solution (the webservices API) given half of a contract.

Resources