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

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

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

How do Mobile Apps communicate with a server?

How do Mobile Apps communicate with a server? Does this communication happen over HTTP or are there other methods (for instance, I guess a mobile app could open a socket)? Does this differ form device to device? Is there one most commonly used approach? If the communication happens over HTTP how do the URLs look like? Is there a way to identify the app based on the the "User Agent" in the HTTP request if the communication is happening over HTTP?
Mobile Apps can communicate with a server in many ways. Mobile apps can also use other features of the mobile. For instance SMS , MMS. Its pretty open really. Your question could be "how do computers communicate with a server?".
A mobile app can be a simple as loading a web page. This would be http.
The problem with mobile apps. They run on phones. There are lots of different phone manufacturers and its up to them (in some case the mobile phone operators also have weight) what to allow the programmer to do by the choice of operating system.
If you are getting started with mobile apps. Take a look at android its pretty simple to get going with if you know a little about programming.
As for the useragent. It depends but usually if you are using the http api on the phone, you can set the user agent to what ever you want it to be, its just a string.
Hope this helps!
Communication usually happens over http. Applications usually identify themselves in the User Agent field

What would be the best solution for having a mobile application store/retrieve/update data

I'm developing a web based application built on codeigniter which will also have a mobile application(blackberry, iphone, android etc.). The web application will be connecting to a (mysql) database to store/retrieve/update data. I would like to know what would be the best solution for having a mobile application store/retrieve/update data.
Taking into consideration performance, flexibility, Security
Look at your device no different than if it was a browser. The are both clients. All devices (well at least Android and iOS) provide you with ways to make xhr requests, just like your browser does. So you need an API on your server that your device will use to get the data. Note that if your application does not already have an API, you will need to develop one.

Resources