<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Joe</title>
    <description>The latest articles on DEV Community by Joe (@joevaugh4n).</description>
    <link>https://dev.to/joevaugh4n</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1124064%2F3c6fe204-4f16-4e0d-bc9d-a7341be1792e.jpg</url>
      <title>DEV Community: Joe</title>
      <link>https://dev.to/joevaugh4n</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/joevaugh4n"/>
    <language>en</language>
    <item>
      <title>Cross-browser testing for 2023</title>
      <dc:creator>Joe</dc:creator>
      <pubDate>Thu, 10 Aug 2023 13:14:55 +0000</pubDate>
      <link>https://dev.to/joevaugh4n/cross-browser-testing-for-2023-3fg4</link>
      <guid>https://dev.to/joevaugh4n/cross-browser-testing-for-2023-3fg4</guid>
      <description>&lt;p&gt;Browser-specific bugs are inevitable. Each browser uses a different rendering engine, which means the UI can work in one browser and break in another. At the same time, manually testing multiple browsers is impractical when you're reviewing thousands of variations.&lt;/p&gt;

&lt;p&gt;In this post, learn about the landscape of cross-browser testing in 2023. Discover which browsers you should be testing—and in which situations. Plus, we’ll highlight the scenarios where less-popular browsers can be omitted, and delve into the question: can you get away with testing in one browser only? Spoiler: yes you can!&lt;/p&gt;

&lt;h2&gt;
  
  
  Which browsers should you test?
&lt;/h2&gt;

&lt;p&gt;To determine which browsers your app should support, there are four main factors you need to consider:&lt;/p&gt;

&lt;p&gt;📊  The popularity of each browser&lt;br&gt;
👩‍💻  Your app’s number of users&lt;br&gt;
🌏  The location of your users&lt;br&gt;
👯  The size of your team&lt;/p&gt;
&lt;h2&gt;
  
  
  Popularity of each browser
&lt;/h2&gt;

&lt;p&gt;The most accurate browser usage stats are the ones collected on your users using your analytics tools. But that’s not always an option, because, for instance, many users understandably block analytics tools and tracking code or simply because your project is new. So research like &lt;a href="https://www.similarweb.com/browsers/worldwide/desktop/?ref=chromaticblog.ghost.io" rel="noopener noreferrer"&gt;browser market share analysis&lt;/a&gt; is essential.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fepfcrab7g23xq9zdhsfb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fepfcrab7g23xq9zdhsfb.png" alt="Cross-browser testing in 2023"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Desktop browser share&lt;/strong&gt; shows Chrome dominating with 66% of total users. Edge is the second most popular desktop browser at 14%. Safari and Firefox together account for roughly another 15% of users. All other browsers combined are used much less from there.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mobile browser share&lt;/strong&gt; has &lt;a href="https://gs.statcounter.com/browser-market-share/mobile/worldwide?ref=chromaticblog.ghost.io" rel="noopener noreferrer"&gt;a clearer usage distribution&lt;/a&gt;. In almost every market, Chrome and Safari together constitute 90% or more of all users. Worldwide, Chrome has about a 65% share to Safari’s 25%. For North America as a whole, Safari’s at 50% and Chrome at 44%.&lt;/p&gt;

&lt;p&gt;What can we take from these numbers? We know that on desktop, there are only four key browsers to support: Chrome, Edge, Safari, and Firefox. And among those, you should focus most of your time on Chrome because it’s over twice as popular as the other browsers combined. For mobile browsers, focusing on Safari and Chrome gives you the most coverage.&lt;/p&gt;
&lt;h2&gt;
  
  
  How many users do you have?
&lt;/h2&gt;

&lt;p&gt;Half of all sites get fewer than 15,000 monthly visitors according to &lt;a href="https://blog.hubspot.com/blog/tabid/6307/bid/5092/how-many-visitors-should-your-site-get.aspx?hubs_content=blog.hubspot.com%2Fblog%2Ftabid%2F6307%2Fbid%2F5092%2Fhow-many-visitors-should-your-site-get.aspx&amp;amp;hubs_content-cta=HubSpot%2527s%2520recent%2520web%2520traffic%2520analytics%2520report%2520&amp;amp;ref=chromaticblog.ghost.io" rel="noopener noreferrer"&gt;a recent Hubspot survey&lt;/a&gt;. This includes early startups, small marketing sites, and side projects.&lt;/p&gt;

&lt;p&gt;For &lt;strong&gt;modest apps&lt;/strong&gt;, we know the majority of users are in one of two browsers: desktop Chrome and either mobile Safari or Chrome. So focusing tests on those two browsers will cover about 75% of desktop users and almost all mobile users. If you’re not planning to support mobile users, you can safely focus on Chrome.&lt;/p&gt;

&lt;p&gt;What if you’re &lt;strong&gt;an enterprise app&lt;/strong&gt;, with many thousands or millions of visitors each month? Since your users are a larger, more diverse group, you should expect the same of their browsers. It makes sense to broaden your desktop tests to include Edge, Safari, and Firefox. Say you have 500,000 users each month—even Firefox at 6% market share still represents over 30,000 of your visitors. Ensuring that many customers are having the experience you want them to have is probably worth your team’s time testing in multiple browsers.&lt;/p&gt;

&lt;p&gt;If you have a &lt;strong&gt;medium-size app&lt;/strong&gt;, your browser testing strategy is less obvious. We established that desktop Chrome and mobile Safari and Chrome give you a majority of coverage. But knowing what other browsers to support requires more information we’ll get to below.&lt;/p&gt;
&lt;h2&gt;
  
  
  Where do your users live?
&lt;/h2&gt;

&lt;p&gt;Browser share varies from region to region. Knowing where your users are visiting from is just as important as how they’re visiting. Even if you’re not absolutely sure who or where your users are, you can still make some good assumptions based on what you &lt;em&gt;do&lt;/em&gt; know.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft7pvf64x4w6nbk3noouv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft7pvf64x4w6nbk3noouv.png" alt="An image of countries around the world"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Knowing where your users are visiting from is just as important as how they’re visiting.&lt;/p&gt;

&lt;p&gt;Are your visitors mostly &lt;a href="https://www.similarweb.com/browsers/united-states/desktop/?ref=chromaticblog.ghost.io" rel="noopener noreferrer"&gt;in the US&lt;/a&gt;? Adding Safari and Edge to your desktop tests is a good idea: Chrome, Safari, and Edge represent over 90% of users. Or maybe they’re &lt;a href="https://gs.statcounter.com/browser-market-share/desktop/india?ref=chromaticblog.ghost.io" rel="noopener noreferrer"&gt;mostly in India&lt;/a&gt;? Almost 90% of the desktop market share is Chrome, so focusing on that one browser seems reasonable.&lt;/p&gt;

&lt;p&gt;You can find desktop usage for wherever makes sense for your users. For instance:&lt;/p&gt;

&lt;p&gt;🇦🇺 &lt;strong&gt;Australia&lt;/strong&gt;: Chrome + Safari + Edge = 95%&lt;br&gt;
🇨🇦 &lt;strong&gt;Canada&lt;/strong&gt;: Chrome + Safari + Edge = 94%&lt;br&gt;
🇮🇳 &lt;strong&gt;India&lt;/strong&gt;: Chrome = 87%&lt;br&gt;
🇯🇵 &lt;strong&gt;Japan&lt;/strong&gt;: Chrome + Edge + Safari = 96%&lt;br&gt;
🇳🇱 &lt;strong&gt;Netherlands&lt;/strong&gt;: Chrome + Safari + Edge = 94%&lt;br&gt;
🇸🇬 &lt;strong&gt;Singapore&lt;/strong&gt;: Chrome + Safari + Edge = 94%&lt;br&gt;
🇰🇷 &lt;strong&gt;South Korea&lt;/strong&gt;: Chrome + Edge = 93%&lt;br&gt;
🇺🇸 &lt;strong&gt;US&lt;/strong&gt;: Chrome + Edge + Safari = 94%&lt;br&gt;
🇬🇧 &lt;strong&gt;UK&lt;/strong&gt;: Chrome + Safari + Edge = 94%&lt;/p&gt;
&lt;h2&gt;
  
  
  Your team’s size
&lt;/h2&gt;

&lt;p&gt;Team size affects how much time you can actually dedicate to cross browser testing. Large teams might have enough people to test in all browsers. While smaller teams need to balance which subset of browsers give the highest test coverage for their limited time. But when it comes to supporting your users, it’s clear that every team needs to test in multiple browsers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdrcfrdhhztvsr3uruzfy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdrcfrdhhztvsr3uruzfy.gif" alt="“Let’s just test these breakpoints one more time…”&amp;lt;br&amp;gt;
"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;“Let’s just test these breakpoints one more time…”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Before visual testing tools like &lt;a href="https://www.chromatic.com/solutions/frontend?ref=chromaticblog.ghost.io" rel="noopener noreferrer"&gt;Chromatic&lt;/a&gt;, developers would open each browser manually to check the UI “looked right.” But apps have so many UI variations that confirming every one by hand is impractical. This is why we recommend &lt;a href="https://www.chromatic.com/docs/ci?ref=chromaticblog.ghost.io" rel="noopener noreferrer"&gt;automating your cross-browser UI tests&lt;/a&gt; for every team.&lt;/p&gt;

&lt;p&gt;Offloading the tedious parts of development to machines is always a win. Every time you push code, Chromatic automatically tests every possible state of your UI in a fleet of cloud browsers simultaneously. If Chromatic detects a bug, you’re notified of where it is, what changed, and in which browser.&lt;/p&gt;

&lt;p&gt;With automated tests, you can focus on building a better product while also getting higher confidence than if you’d tested by hand.&lt;/p&gt;
&lt;h2&gt;
  
  
  Pulling it all together
&lt;/h2&gt;

&lt;p&gt;My goal is to help you figure out which browsers make sense to test in by considering factors like browser market share, how many users, where users live, and your team size. This allows you to focus your efforts where it matters most.&lt;/p&gt;

&lt;p&gt;Which browsers to test in depends on several factors that are unique to your app. Your decisions ultimately break down to something like this:&lt;/p&gt;
&lt;h3&gt;
  
  
  Screen type
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Chrome&lt;/th&gt;
&lt;th&gt;Safari&lt;/th&gt;
&lt;th&gt;Edge&lt;/th&gt;
&lt;th&gt;Firefox&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Desktop users&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mobile users&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;h3&gt;
  
  
  How many users
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Chrome&lt;/th&gt;
&lt;th&gt;Safari&lt;/th&gt;
&lt;th&gt;Edge&lt;/th&gt;
&lt;th&gt;Firefox&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1-15K users per month&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1-15K users per month&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;15K-250K users per month&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;250K+ users per month&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;minimum browsers to test in based on monthly visitor numbers&lt;/p&gt;
&lt;h3&gt;
  
  
  Location of users
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Chrome&lt;/th&gt;
&lt;th&gt;Safari&lt;/th&gt;
&lt;th&gt;Edge&lt;/th&gt;
&lt;th&gt;Firefox&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;North America&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;South America&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Europe&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Africa&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oceania&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Asia&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;(minimum browsers to test in based on visitor location)&lt;/p&gt;
&lt;h2&gt;
  
  
  1-click cross browser testing with Chromatic
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxj97u38fa1zth2ggo1w1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxj97u38fa1zth2ggo1w1.png" alt="Cross-browser testing within Chromatic"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Chromatic is a visual testing tool that supports Safari, Edge, Chrome, and Firefox. Each browser is anchored to the latest stable version and runs in a standardized cloud environment. You can extend test coverage across browsers in one click.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.chromatic.com/docs/browsers?ref=chromaticblog.ghost.io" rel="noopener noreferrer"&gt;Find out more about enabling multiple browsers in Chromatic&lt;/a&gt; 👉&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1689606322357145600-261" src="https://platform.twitter.com/embed/Tweet.html?id=1689606322357145600"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1689606322357145600-261');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1689606322357145600&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;Thanks for reading! I'm staff at Chromatic and the Community Manager for Storybook. Follow me for updates on frontend dev, component-driven development and testing 😎 &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>frontend</category>
      <category>testing</category>
    </item>
  </channel>
</rss>
