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

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

Related

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

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)

What is the best way to simulate real time performance testing in Mobile browsers?

I am working on Mobile Testing of Web Application. I have done real-time performance measurement in chrome browser using JMeter and Web Driver sampler.
Now, I want to do the same in real mobile devices.
For example, if 10 users need to log in, I want to simulate it in multiple mobile devices. Kindly suggest me the best way to do the mobile performance testing.
Since I am working on a web application, it mostly involves in Chrome browser and gmail app's default browser.
If you want to simulate multiple users concurrently accessing your application backend the best way would be going for JMeter's HTTP Request samplers as real browsers are very resource intensive.
Record your mobile device network activity using JMeter's HTTP(S) Test Script Recorder, check out Load Testing Mobile Apps Made Easy guide for instructions.
If your goal is to simulate different devices you can configure relevant User-Agent header in the HTTP Header Manager
Set up as many threads as needed in Thread Group
Run your test and analyze results

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.

Html scraping with JS support

I am trying to scrape a company web page for automation purposes but the embedded scripts in the page prevent me to fully replicate the request. The biggest pain is in the script generated cookies.
I thought of automating IE with Watin but I am not comfortable with this solution under a service application.
What are your advices in this situation?
Thanks in advance.
screen-scraper is another tool (java based) that aims at being easy to use.
The basic idea is as Byron said- you will have to figure out what cookies are getting set (web proxy tools like Fiddler, Charles, or browser extensions like Firebug and Chrome's dev tools will come in handy).
So, you don't necessarily have to read or even execute the javascript on the page to imitate the same requests. Just use a proxy tool to see what cookies your browser is sending to the server, and once you know what cookies the site expects to receive, set them manually in whatever script or tool you use to do your scraping and you'll be golden.
You have several options.
The easiest is to generate the cookies in your script. You will have to read the javascript code yourself and figure out what it is doing and duplicate. Fiddler is always your friend when scraping.
Htmlunit is a java web browser library with JavaScript support. It has no gui and is made for testing web applications.
Selenium will driver a browser much the same way watir does, but it has rich api support for most major languages.

Resources