Local Testing and Its Drawback

There are benefits to Local Testing - quickly run unit tests, quality check of code, or one-off manual check. However, there are a few drawbacks to running your tests locally only.

While there are a few different definitions of “Local Testing” that have appeared in recent years, there is only one that is commonly accepted among developers and testers alike. At Sauce Labs, we define local testing as any test that is done on a developer’s/tester’s own machine. Similar to local development, you execute your tests, whether they are automated or manual, locally as opposed to externally (i.e. on any hosted server or testing grid).

There are benefits to this approach - mainly the fact that you are able to quickly run unit tests to check the quality of your code, or run manual tests on your app for one-off issues that may arise in production. However, there are a few drawbacks to running your tests locally only:

  • Older browser support = reduced quality - sure, you may have a couple of different browsers on your computer. However, chances are that your customers are using browsers that you don’t have downloaded on your local machine. Additionally, many people may still be using different versions of browsers that you don’t have access to. This also applies to operating systems - your local machine is not able to account for all of the different versions of Windows and MacOS and their components to ensure that your app works as expected. A lack of coverage across different browser/OS combinations means that local-only testing cannot guarantee your app is to the quality standards that your users expect.

  • Testing becomes a bottleneck - say that you have access to every browser and operating system your users can access your app from on your local machine. Problem solved, right? Not so fast! Even if you have the coverage, running tests from your local machine means that each of those tests have to run one at a time, even if they are automated. Serial testing significantly slows down the speed at which you can release new features to delight your users. And if you are working in CI/CD workflow, this means that the entire build can be waiting on your tests to finish executing.

  • No accountability for mobile - over 50% of the world’s digital traffic is coming from a mobile device. And with the proliferation of hundreds of different device types across the Android and iOS operating systems, testing through your local machine simply cannot account for this breadth, and the quality of your app is at risk.

Local testing is valuable in certain scenarios, but if you want to deliver your applications at the speed and quality your users demand, it is imperative to execute your tests through an external test infrastructure. This can be in the form of a home-built grid with access to the various browsers, operating systems and mobile devices, or by outsourcing that infrastructure to a service like the Sauce Labs Continuous Testing Cloud.

Sauce Labs provides:

  • The world’s largest cloud for continuous testing, with the industry’s most comprehensive coverage across different browsers, operating systems and mobile devices (both real devices and emulators/simulators)

  • A highly scalable platform that allows you to execute your tests in massive parallel, decreasing your testing time by upwards of 10x, and eliminating a common bottleneck to achieving true CI/CD

  • Tools that allow you to fully understand the efficacy of your testing - such as videos, screenshots, logs and full analytics to determine where gaps may exist

To learn more about how Sauce Labs can level up your testing, sign up for a free trial today.

Topics

Continuous testingReal DevicesEmulatorsSimulatorsCI/CD