Perform Automated Layout Testing using Galen Framework on BrowserStack.
BrowserStack is a cross-browser testing tool, to test public websites and protected servers, on a cloud infrastructure of desktop and mobile browsers. For more information visit https://www.browserstack.com.
Galen is an open-source tool for testing layout and responsive design of web applications. It is also a powerfull functional testing framework. For more information visit http://galenframework.com.
How to Install Galen
- For installing Galen on OSX and Linux visit http://galenframework.com/docs/getting-started-install-galen
- For configuring Galen on Windows visit http://mindengine.net/post/2014-01-08-configuring-galen-framework-for-windows
Run Galen Tests on BrowserStack
Just a few things you should ensure before running Galen tests on BrowserStack:
- First you need to have an account at BrowserStack (Sign-up). The free trial gets you access to 100 minutes of BrowserStack Automate with 5 parallel runs which should be enough for you to try out your Galen tests.
- Get your Automate
Access Keyfrom here, after you login to your account.
- Add these credentials to the test files, to point your tests to BrowserStack's Selenium Hub.
Here are the two kinds of galen tests which you can run on BrowserStack:
Using Galen Specs Language you are able to describe any complex layout including different screen sizes or browsers. It's not only easy to write, it is also easy to read if you are unfamiliar with the language. A list of all capabilities for running tests on various BrowserStack platforms can be found here.
Command to execute the Galen Spec test:
galen test BrowserStackTest.test --parallel-suites 2 -Dbrowserstack.username=<USERNANME> -Dbrowserstack.key=<KEY>
galen test BrowserStack.test.js --parallel-suites 2 -Dbrowserstack.username=<USERNANME> -Dbrowserstack.key=<KEY>
here):Command line arguments (More information
- htmlreport - path to folder in which Galen should generate html reports
- testngreport - path to xml file in which Galen should write testng report
- parallel-suites - amount of threads for running tests in parallel
- recursive - flag which is used in case you want to search for all .test files recursively in folder
- filter - a filter for a test name
- Selenium Testing on BrowserStack - https://www.browserstack.com/automate
- Galen Specs Language Guide - http://galenframework.com/docs/reference-galen-spec-language-guide