Have you ever wondered how to successfully automate your cross-browser tests? With the number and type of mobile and tablet devices available in the market increasing daily and the crazy combination of browser types and browser versions making things even more complicated, if you are a website or web app developer then making sure your application renders and functions correctly on all those combination of browsers, devices and platforms is often enough to make you want to pull out your hair! Add things like compatibility and browser support for IE11 to the mix and things can get pretty tense. However, with the recent advancements in cross browser test accelerator technologies today we can perform these cross browser tests more reliably and more extensively than ever before.
Before we delve deeper into different approaches to automate your cross browser testing efforts, let’s first see what Cross Browser Testing is all about, why performing cross platform compatibility testing is often inadequate because of the various challenges associated with it, how to mitigate these challenges via test automation and finally, all the features to look for when comparing some of the best cross browser testing tools to automate such testing efforts.
What is Cross Browser Testing?
Cross Browser Testing is the type of testing where we verify to ensure that an application works as expected across different browsers, running on different operating systems and device types. In other words, by performing this type of functional testing a tester checks the compatibility of a website or web app across all supported browser types. Thus, by conducting specialized browser testing, you can ensure that the website / web app is able to deliver an optimal user experience, irrespective of the browser in which it is viewed or accessed.
Major Challenges with Cross-Browser Testing
Let us face it! Testing a web application across all major browser/device/OS platform combinations can be a seriously daunting task. One of the major pain-point with performing thorough Cross Browser Testing is that your testing team would have to test the same website or web application across all the different browsers, operating systems and mobile devices. This is when each browser uses their own different technology to render HTML. Mentioned below are some of the major aspects that make cross browser testing challenging.
1. It is IMPOSSIBLE to test in All Browser Combinations
Let’s assume that your contract with the client mandates that the website or web application being developed should support Chrome, Safari, Firefox, Opera, and Internet Explorer on Windows, macOS, and Linux operating systems. While this may rather seem a little too formidable at first, it actually is pretty manageable:
macOS: 4 Browsers (Chrome, Safari, Firefox, Opera)
Windows: 4 Browsers (Internet Explorer, Chrome, Firefox, Opera)
Linux: 3 Browsers (Chrome, Firefox, Opera)
That’s a total of 11 browser combinations.
But not all your end users are expected to be using the very latest version of each of these browsers. So it is often safe to test using at least the latest 2 versions of each browser.
macOS: 8 Browsers (Chrome, Safari, Firefox, Opera)
Windows: 8 Browsers (Internet Explorer, Chrome, Firefox, Opera)
Linux: 6 Browsers (Chrome, Firefox, Opera)
That’s a total of 22 browser types.
Now that we have taken the latest 2 versions of each browser type into consideration how about the latest versions of each OS? Surely, people upgrade their OS far less often than they upgrade their browsers, right? So to be safe, let’s test across the latest 3 versions of each OS platform.
macOS Catalina: 8 Browsers (Chrome, Safari, Firefox, Opera)
macOS Mojave: 8 Browsers (Chrome, Safari, Firefox, Opera)
macOS High Sierra: 8 Browsers (Chrome, Safari, Firefox, Opera)
Windows 10: 8 Browsers (Internet Explorer, Chrome, Firefox, Opera)
Windows 8.1: 8 Browsers (Internet Explorer, Chrome, Firefox, Opera)
Windows 8: 8 Browsers (Internet Explorer, Chrome, Firefox, Opera)
Ubuntu 20.04: 6 Browsers (Chrome, Firefox, Opera)
Ubuntu 19.10: 6 Browsers (Chrome, Firefox, Opera)
Ubuntu 18.04: 6 Browsers (Chrome, Firefox, Opera)
That’s a total of 66 browser combinations.
What started out as a manageable list is now already a substantial and daunting list of browser combinations to test against even for teams with a dedicated team of a good number of QA specialists. Add to the mix the possibility of testing across 32x and 64x variations of each OS type, testing across various possible screen resolutions and the fact that you’d need to retest across each of these combinations every time there is a bug fix, it is easy to feel frustrated and even give up!
If you are planning to do all these cross browser testing manually then even if you make smart use of user analytics to prioritize only the combinations that your end users are using, even then the list would be just too long to maintain sanity.
2. Frequency of Automatic Browser Updates
Who does not want to use the latest version of their browsers? Many do for sure, isn’t it? Add to the fact that most popular browsers today like to deploy their latest stable builds automatically by upgrading automatically. This may be a good thing for the end users, but it becomes one more challenge to manage when it comes to performing cross browser testing.
Imagine being running a cross browser testing campaign for almost a month, and after a number of bug fixes, re-testing cycles when you are finally close to the app launch two of the supported browsers release their latest versions and push automatic updates. The result could be a disaster for the testing team, especially if one of those latest automatic browser updates starts breaking your web app that was ready to be shipped.
3. Cross Browser Testing is often Hard to Automate on Your Own
If you are someone who has never tried to automate cross browser testing, then automation may sound like a reasonable solution to a difficult problem. Afterall, the whole problem with efficient cross browser testing is because of the sheer number of different combinations where one needs to test. So, it should be pretty easy to tackle via automation as then we can perform more tests than one could ever perform manually, right?
While this all sounds pretty easy and manageable in theory, if you are trying to perform automation only via the usual functional testing tools such as Selenium etc. and trying to use the in-built browser grid or even your own grid, things can get pretty complex, pretty quickly. Then there is page UI testing via automation and layout test automation. While this is doable via detecting changes via screenshots, it can be rather complicated.
How to Overcome these Cross-Browser Testing Challenges via Effective Test Automation?
I know I said earlier that automating cross compatibility testing can be hard, but that’s not if you know how to leverage using some of the best cloud-based cross browser testing tools that are in the market today. These SaaS-based cross browser testing tools can be easily used in conjunction with popular test automation tools like Selenium Webdriver (or even Appium if you are after performing cross device testing of mobile apps) to offer excellent test coverage.
We all know that tools like Selenium Webdriver already come equipped with support for Internet Explorer, FireFox, Chrome, Safari browsers. However, the challenge arises when we attempt to execute those tests across the different browser versions across different devices, OS platforms, screen resolutions etc. And that is where using a cloud-based cross testing tool such as BrowserStack, SauceLabs, LambdaTest, CrossBrowserTesting or BrowserLing can really come in handy.
Depending on the plan/license type most of these tools offer the following key features to reliably mitigate some of the key cross browser testing challenges I mentioned above.
- A cloud-hosted test environment (essentially a VPN hosted PC or Mobile device)
- An easy way to facilitate test execution via their numerous combinations of testing environments from tools such as Selenium Webdriver.
- Membership pages that require authentication to be viewed, pages that are only accessible via pre-defined IP addresses etc. can also be tested using Local testing plugins.
- Screenshots and videos can be captured during execution of each of the automated tests.
- Excellent reporting where you can quickly look at tests (along with screenshots and video screen recordings) that failed during test execution.
If creating a good first impression on your end-users by providing them with a reliable and consistent experience throughout the application, irrespective of the browser or operating system is important to you then you cannot ignore cross browser testing. Owing to the sheer number of combinations of browsers, devices, and platforms one must consider while performing Cross-browser testing, it can be sometimes challenging. But it need not be.
Thankfully, by combining the power of modern test automation frameworks and functional testing tools along with cloud-based cross-browser testing services, you can quickly and successfully build robust cross browser automation test frameworks that will not only produce good results but also do it in a much faster time.
This is a Guest Post by Bill Knight
This article was written by Bill Knight, a senior test engineer with over 12 years of industry experince in the field of quality assurance. Bill works for a leading software testing company and has a special interest in cross browser testing. Bill likes to interact with fellow testers and loves to write articles on popular software testing blogs during his free time.
<Image Credits – Bugraptors.com>