Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

How to Perform Cross-Browser Testing From Various Geo Locations

DZone's Guide to

How to Perform Cross-Browser Testing From Various Geo Locations

Ensure that you're controlling your user experience by testing the appearance and features of your web page from multiple geographic locations with cross-browser testing.

· DevOps Zone ·
Free Resource

Discover how you can reduce your Kubernetes installation from 22 steps to 1.

Does your website look the same from North America as it looks from some other location? Websites behave differently from different geographic locations, and that might concern you the most if you are running some ads on your website or your website shows different features to different users based on location, or if you have an internationalized website that shows different language web pages based on user location.

Have you ever gone into some deep research by checking the Google results of a specific keyword from different locations?

If not, have a look at the keyword "LambdaTest" when searched from Germany:

Image title

Now, check this screenshot where I have searched "LambdaTest" from the US:

Image title

You may find visible differences that are quite easy to understand:

  • In the US location, you can see that the Sign Up, FAQ, Blog, and Support cards are generated under the first search result, but in the search in Germany, they are just created for Blog and Testing of locally hosted pages.
  • You can see that the order of search results is also different.

This is just a basic example. When location defines a major characteristic of your website, it becomes necessary to check your website from different geographic locations.

  • If you allow payment on your website, ideally, users from the US should see the total amount to be paid in USD while the ones paying from Germany should get an estimate in Euros. This is an important factor which usually goes unnoticed. In addition, the location may also change the payment gateway. For example, a payment gateway used in the US may not be compliant with the new GDPR policies in Europe, and you may need to show different a payment gateway for European users.
  • The same goes for your website’s search results. The audience in the US will have different taste in terms of accessories, clothing, eating habits, etc as compared to people from Germany, so if your website is internationally hosted, you might want to check what your search is showing to them.
  • If you’re running ads on your website, you might be interested in knowing what ads are being shown on your website in a different location. So, what are you going to do? Again, you would test from a different geographic location.

Cross-Browser Testing From Different Locations

The major point that catches the attention of the users lies behind the browser or OS or device that they are using. As I have already mentioned in a blog about the effect of location on cross-browser device selection, you need to change your priority browsers according to the locations.

People in different locations have a different liking for browsers, operating systems, and devices, so if you’re checking for Germany location, you might want to prioritize your browsers as: Chrome, Firefox, and Safari and if you are testing for Japan you’ll need to go for Chrome, Safari, IE. That’s the catch here. Cross browser testing from different geo locations.

Before going into the details, there are some terms we will be using in this post which you should know beforehand:

  • VPN, Virtual Private Network: A VPN is a popular internet shielding method basically used to shield your activity from your ISP (Internet service provider) by adding a layer of security to both public and private networks. A VPN allows you to send and receive data while maintaining the security of a network by allocating you a different IP so that even your ISP will not be able to track your activity.

  • Localhost Tunnel: When you connect a tunnel, you can allow your local files to be accessed by a specific machine. An SSH tunnel is one such way, where you can connect your local files to the cloud.

You can also test using different locations by connecting a VPN to your local system and browsing your website in your local browser. But if you want to perform cross-browser testing using a different location, you will need to connect a tunnel, then perform testing using the tunnel on  VPN.

Testing From Different Locations Using a VPN

Now, if you want to test your pages on different locations, all you need to do is install a VPN solution, change your location to the desired location in the VPN solution, and start testing on your browser. All traffic will be routed via VPN and your system browser’s apparent feel would be as if it’s in another country. The challenge comes when you have to perform cross-browser testing of geolocation features of your web pages.

Lambda Tunnel + VPN = Cross-Browser Testing From a Different Location

Lambda Tunnel creates a secure shell protocol based connecting tunnel between your system and LambdaTest servers. In other words, Lambda Tunnel allows you to connect your local machine to LambdaTest cloud platform and test on LambdaTest browsers. This feature is used mainly for testing locally hosted or privately hosted web pages and web apps. The important point to note here is that once you have connected Lambda Tunnel, all pages that you open in LambdaTest platform are routed through your local system’s internet. So, if your location is set to California via VPN, then pages you open on the LambdaTest platform would show as if they are being opened from a California location.

Let me explain it in a simpler way.

There is a VPN connected to your local machine, so your local machine is using some distant location as per your desire. Say, your local machine is on California’s IP after being connected to a VPN. Now, you want to perform cross-browser testing of your website on different combinations of Chrome using California’s IP. All you need is to connect Lambda Tunnel with your machine and access your website on the desired chrome combination. And, woohoo! You’re now viewing your website from California. Simple?

So, let’s just set this up step-by-step.

  1. Create an account on LambdaTest. The major plus is, it’s free of cost.
  2. Install a VPN on your local machine. You can install any Chrome extension if you’re using Chrome, like SetUpVPNDotVPNColorful Galaxy or another VPN service.
  3. Create an account and start the VPN.
  4. Once you start the VPN, type "what is my IP location" in the new tab. You’ll get to know the IP location along with your IP address.

Image title

5. Nest, log into your LambdaTest account and connect the SSH tunnel using the following documentation on connecting a localhost tunnel.

6. After connecting the localhost tunnel, just launch your desired browser. I have launched lambdatest.com on Chrome 68, Windows 10 by selecting tunnel while launching.

7. As you can see in the screenshot below, lambdatest.com is accessed from California on Chrome 68, Windows 10.

Image title

8. To make sure of this, you can also check the IP address and the IP location inside the VM using the same text.

Image title

This way, you can test your website from different geographic locations.

Cross-browser testing a website from different locations is as important as performing cross-browser testing itself. This will help you prevent unexpected user issues worldwide by solving them beforehand.

Happy testing!

Download the Kubernetes cheatsheet to learn more about how easy it is to run Kubernetes on any infrastructure with Mesosphere DC/OS

Topics:
cross browser testing ,web testing ,devops

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}