Friday, March 13, 2015

Testing with BrowserStack

Introduction
In this article we will present you BrowserStack used for
- live testing on different environments
- running your selenium tests on BrowserStack virtual workstation by using the desired capabilities
- taking screenshots of you page

In order to test the functionality of this tool you have to create an account and you'll have 100 minutes free plan for live testing, 100 minutes for automation and a limited numbed of screenshots.

Live testing 
With BrowserStack we can perform compatibility testing (public/internal url) on different OSs (Win 8.1, 8, 7, XP, MAC) and browsers , including Mobile and Tablet emulators (IOs, Android, Windows phone and Opera). This means that is no need for virtual workstations. 

On the virtual workstations we have Developers Tools Installed.

Negatives about this: not possible to test animations, refresh is too slow, not possible to listen to audio

Automation
BrowserStack allows running Selenium and JavaScript tests on multiple browsers in parallel: testing time can be cut down significantly if there are multiple tests running in parallel. This can be the same test running on different configurations (OS/browser), or different tests running on the same configuration. With access to our extensive BrowserStack cloud, parallel testing on many platforms becomes very efficient

Automated tests can be included in the following continuous integration systems: Jenkins, Travis, Circle

The tests can be written in C#, Java, Pyton, Ruby, Perl, Php, Node.js

Below you have an example of test written in Visual Studio with C# and opens google.com and submits text "Browserstack".


Enter your login data in:
("browserstack.user", "...")
("browserstack.key", "...")

The result is shown like this in BrowserStack account. Advantage: no need for having a remote connection, also we can see step performed in a visual manner by accessing Visual Logs tab


Screenshots
This functionality allows to view websites on real devices, with actual screen sizes, resolutions and view-ports:

We can also check web page layouts across multiple browsers at once by taking screenshots on different OS/browsers. With only one click we can generate images of a page. The images can be zipped and send to be analysed.
Costs


Conclusions

Buy the tool for one month to verify the offered functionality for:
- cross-browser testing functionality on many devices, including mobiles and tablets
- automation testing with selenium: we don’t need to create virtual workstations anymore with different environment and also able to run test in parallel (this should be tested in more detail before buying the product)
- screenshots – I would recommend this only for one user (which is more focused on UI testing, e.g. designer)

Recommendations: before buying the tool for automation, make sure you have the people capable of writing automated tests in one of the enumerated languages (for example I use C# in visual studio for selenium)

Advantages:
- no need for virtual workstations to perform manual testing and to run automated tests
- can run test in parallel
- emulators for mobile 
- pre-installed developers tools
- multiple desktop OS
- real browsers
- can test local and internal servers

Disadvantages:
- can be better documented (documentation can be found here https://www.browserstack.com/automate/c-sharp)
- sometimes is slow
- not possible to test animations,
- refresh is too slow,
- not possible to listen to audio

More reviews (different opinions):
http://www.sitepoint.com/review-browserstack-com/
http://code.tutsplus.com/tutorials/using-browserstack-for-cross-browser-testing--net-35487
https://www.trustradius.com/products/browserstack/reviews


Happy testing and... make it green, becomes a dream :).

Popular Posts