<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Arbaaz Dossani on Medium]]></title>
        <description><![CDATA[Stories by Arbaaz Dossani on Medium]]></description>
        <link>https://medium.com/@arbaaz.dossani?source=rss-81b6818eff3d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*yMzdQzK0QmMGlcZB3rGPSQ.jpeg</url>
            <title>Stories by Arbaaz Dossani on Medium</title>
            <link>https://medium.com/@arbaaz.dossani?source=rss-81b6818eff3d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 15:36:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@arbaaz.dossani/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[HelloFresh’s Brownfield Leap: One App to Feed Them All!]]></title>
            <link>https://engineering.hellofresh.com/hellofreshs-brownfield-leap-one-app-to-feed-them-all-56244a22ceeb?source=rss-81b6818eff3d------2</link>
            <guid isPermaLink="false">https://medium.com/p/56244a22ceeb</guid>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[hellofresh]]></category>
            <category><![CDATA[brownfield]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <dc:creator><![CDATA[Arbaaz Dossani]]></dc:creator>
            <pubDate>Mon, 06 Oct 2025 09:20:23 GMT</pubDate>
            <atom:updated>2025-10-06T09:22:48.997Z</atom:updated>
            <content:encoded><![CDATA[<p>Co-author: Daniel Arias</p><p>When you serve millions of customers across multiple brands and geographies, consistency and speed matter — not just in how quickly the food arrives at your doorstep, but also in how seamlessly your mobile app supports that journey. At HelloFresh Group, our brands’ mobile apps are the backbone of the customer experience: browsing meals, managing deliveries, skipping weeks, redeeming benefits, and much more.</p><h3>Too Many Apps, Too Many Stacks 😵‍💫</h3><p>HelloFresh Group’s mobile apps are used by millions of active users across our brands, with<a href="https://www.factor75.com/"> Factor</a>, our emerging Ready-to-Eat (RTE) brand, now spanning seven countries. But here’s the catch: our apps were powered by <strong>two very different infrastructures</strong>.</p><ul><li><strong>Meal kit brands (HelloFresh, Everyplate, etc)</strong> → Native Swift/Kotlin codebases.</li><li><strong>Ready-To-Eat brands (Factor, Youfoodz)</strong> → React Native codebase.</li></ul><p>Great for <em>variety and customisation</em>.<br>Terrible for <em>velocity</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HU7SaaIxJO0CftgmFNo5mg.jpeg" /><figcaption>Woe! Our old mobile apps architecture</figcaption></figure><p>This meant duplicated engineering, slower feature delivery, impossible feature parity, and teams blocked from contributing across brands. With millions of active users across the globe, we couldn’t afford to ship new experiences with this kind of fragmentation.</p><p>That’s where <strong>PUMA</strong> (Project Unified Mobile App) comes in. And yes, we couldn’t resist the pun: after years of running multiple “tiger teams,” we decided to upgrade to a PUMA — because this is a team composed of engineers across the org focused on agility, speed &amp; long-distance.</p><h3>Project PUMA: One App to Feed Them All 🐆</h3><p>We kicked off <strong>PUMA</strong> (Project Unified Mobile App): a single platform that powers all our brands and allows us to ship core experiences once, customize where it matters, and maintain brand identity without the overhead of managing multiple codebases.</p><p>Key outcomes:</p><ul><li>Increased feature development velocity across all brands,</li><li>Ability to easily customize brand experiences</li><li>Reduced redundant engineering effort across brands/platforms</li><li>Increase our org-wide mobile development capacity by leveraging existing JS/React development teams</li></ul><p>The big question was <em>how</em>?</p><ul><li>Do we throw away everything and rebuild from scratch (a.k.a. Greenfield)?</li><li>Or do we progressively adopt a common technology while keeping existing native apps alive (a.k.a. Brownfield)?</li></ul><p>Spoiler: We chose <strong>Brownfield React Native</strong>.<br>Why? Because it gave us the best of both worlds:</p><ul><li><strong>Stability of native</strong> for critical flows and ability to leverage features our iOS &amp; Android native developers had iterated on for years</li><li><strong>Flexibility of React Native</strong> for fast, cross-brand features and quickly iterating on brand-specific functionality.</li><li><strong>Incremental rollout</strong> instead of a “big bang” rewrite, reducing risk and limiting feature freezes.</li></ul><p>Think of it as renovating a house while the family continues to live inside. Messy at times, but no one gets locked out. 🏡</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tMN9vLRB9MjIlUe-dwb_WA.png" /><figcaption>Behold! Our new mobile apps architecture</figcaption></figure><h3>How It’s Going: Brownfield in Action 🚀</h3><p>In Q4 2024, we bootstrapped the <strong>Shared Modules</strong> repository. This enabled teams to:</p><ul><li>Build cross-platform features in <strong>React Native</strong>,</li><li>Import them into native apps (Swift/Kotlin) without rewriting,</li><li>Extend core native modules only where performance or OS-level integrations are critical.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rPEeoQQgTonY6TW7.png" /></figure><p>In Q1 2025, the Unified Mobile App architecture was released to production, introducing a few small React Native screens into the native HelloFresh iOS and Android apps for the first time.</p><p>Our 2nd large milestone of this migration came recently in Sept 2025, when we launched a net new <a href="https://apps.apple.com/us/app/factor-prepared-meal-delivery/id1015997735">Factor</a> mobile app on this brownfield architecture — leveraging native experiences across some functionality but adopting React Native across most critical journeys.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*OGKGZI0nSdlss01bqR5W7g.gif" /><figcaption>React Native powered Home and Shopping Experience</figcaption></figure><p>By the end of 2025, we plan to further adopt React Native across critical journeys of all 6 of our current mobile apps, including our largest brand — HelloFresh. Although we are already seeing delivery velocity improvements, once all app migrations are complete, we expect to deliver core functionality across all HelloFresh Group mobile apps roughly 3x faster than in 2024.</p><p>All-in-all, this wasn’t just a tech migration. It is a fundamental change to the way our engineering, product &amp; design teams operate — allowing for accelerated planning &amp; development cycles and unlocking more development capacity across the org.</p><p>To make this transformation possible, we developed an internal React Native training program, gave our engineers dedicated time to learn, and accelerated their onboarding through GenAI-assisted learning. Upskilling at scale in such a short timeframe was one of our biggest challenges — and proudest achievements.</p><h3>Beyond Code: Why the Business Cares 📊</h3><p>So what does this mobile technology migration mean for the overall HelloFresh Group? There are few benefits:</p><ul><li><strong>Faster innovation</strong>: Launch new product offerings and brands like RTE across multiple brands in months, not years.</li><li><strong>Consistent CX</strong>: Customers across HelloFresh, Factor, and other brands benefit from unified, predictable experiences built on a shared design system and common functionality.</li><li><strong>Lower cost of ownership</strong>: Reduce duplicated effort and maintenance cost across all of our mobile apps.</li><li><strong>Future-proofing</strong>: A modular and cross-platform architecture means a lower barrier to entry for newer brands or acquisitions to introduce mobile apps</li><li><strong>Increased Experimentation &amp; Customization</strong>: Cross-platform development allows us to iterate &amp; experiment quickly on unique customer or brand experiences.</li></ul><p>PUMA is not just about tech. It’s about giving HelloFresh Group the ability to innovate quickly and become a more integral part of our customers’ daily lives — and continue our mission to <em>change the way people eat forever.</em></p><h3>The Road Ahead 🔮</h3><p>PUMA is just the start. Throughout the remainder of of 2025 and 2026, we are investing in:</p><ul><li>Further adopting React Native across more areas of our mobile apps</li><li>Investing in app performance and native integrations</li><li>Investing in tooling (think Feature Configs, over-the-air releases).</li><li>Leveraging Generative AI to accelerate development, enhance personalization, and empower teams with intelligent automation across the mobile ecosystem.</li><li>Further innovating on the mobile app experiences across our brands to make us a larger part of customers’ daily lives</li></ul><h3>Wrapping it Up 🎁</h3><p>From reducing the app bundle size (<a href="https://engineering.hellofresh.com/how-we-reduced-newbrands-app-size-by-over-70-1f3f7086b450">blog</a>) and hotfix times with over-the-air updates (<a href="https://engineering.hellofresh.com/reducing-app-hotfix-time-by-98-9-from-3-days-to-under-45-minutes-5ce324a93fb2">blog</a>), bridging the platform UI gap (<a href="https://www.youtube.com/watch?v=sNQh10QxSk4">link</a>) with GenAI and now transitioning to a full Brownfield React Native architecture, we have been on quite a journey with React Native over the past couple of years — and this is just the start!</p><p>Stay hungry. The best is yet to come. 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56244a22ceeb" width="1" height="1" alt=""><hr><p><a href="https://engineering.hellofresh.com/hellofreshs-brownfield-leap-one-app-to-feed-them-all-56244a22ceeb">HelloFresh’s Brownfield Leap: One App to Feed Them All!</a> was originally published in <a href="https://engineering.hellofresh.com/">HelloTech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reducing App Hotfix time by 98.9% 
(From 3 days to under 45 minutes)]]></title>
            <link>https://engineering.hellofresh.com/reducing-app-hotfix-time-by-98-9-from-3-days-to-under-45-minutes-5ce324a93fb2?source=rss-81b6818eff3d------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ce324a93fb2</guid>
            <category><![CDATA[hotfix]]></category>
            <category><![CDATA[code-push]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[continuous-deployment]]></category>
            <category><![CDATA[react-native]]></category>
            <dc:creator><![CDATA[Arbaaz Dossani]]></dc:creator>
            <pubDate>Wed, 24 Aug 2022 08:15:44 GMT</pubDate>
            <atom:updated>2022-08-27T06:00:22.145Z</atom:updated>
            <content:encoded><![CDATA[<h3>Reducing App Hotfix time by 98.9%(From 3 days to under 45 minutes)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*9GpJdC-HPiJ1UX7tc7q2hQ.png" /><figcaption>Traditional Release vs Codepush Release</figcaption></figure><h3>What! It seems like you had a pretty bad app crash, huh?</h3><p>Ok. Imagine this…<br>What if we messed up something big time in the previous app release for our New Brands? The reasons can be many. Also, spoiler alert… The business impact is unpredictable and usually very high! Think about delivering a crash on your Dashboard page for a collection of apps that serve over <strong>8 million</strong> active users for Q2 this year!</p><p>Since the New Brands Alliance consists of 7 squads working on 5 brands on a single repository, it is highly likely that the scaling of these parameters will eventually lead to an increase in the risk of delivering features to users with a potential bug that can cause poor user experience and may lead to business loss!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*vp8BwMRGdIYUc-UoOucR3Q.png" /><figcaption>The scalability of apps is a big concern!</figcaption></figure><h3>Ok! But you obviously release hotfixes, don’t you?</h3><p>Of course, we do! That’s where the problem lies. The existing process of our delivering hotfixes was very similar to the<strong> traditional approach</strong> that we see in the first visual. The process involved the following sequence of steps:</p><ol><li><strong>Patching the bug with Hotfix<br>- </strong>Creating a patch for the bug with hotfix<br>- QA-ing the changes<br>- Merging these changes to the main branch</li><li><strong>Publishing the apps<br>- </strong>Creating new releases on the public app stores<br>- Waiting for the long-review period<br>- Finally, delivering the hotfix to the user via optional phased rollouts</li></ol><p>Step 1 is relatively straightforward. We identify the issue through our analytics, inform the relevant team, and quick fix and merge the changes. Easy-peasy!<br>Step 2 is where the fun begins… We trigger the automated submission workflows which take a very long time to run as they have to create separate android and iOS builds and work on security, minification, and internal metrics before finally releasing these apps to their respective public app stores. We have to run these for all our brands (currently 5) which consume a lot of time. The review and rollout process for public app stores usually takes more than 3 days.</p><p>So, on average, it takes over 3 days for a hotfix to be identified, fixed and delivered to the users! Pretty bad, huh?</p><h3>Yeah, Pretty bad! Are there any concerns other than the delay?</h3><p>Unfortunately, yes. Besides the delay in delivering the hotfix to the user, there is also an issue with updating the app. If the hotfix was supercritical (like an app crash or a blank screen), it means that we had to force all users to update to the latest app version with the help of an annoying sticky page. Pretty frustrating for our users, no?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/242/1*qKvyNIT8FHrqRPLmfIrI0Q.jpeg" /><figcaption>The annoying sticky update page</figcaption></figure><h3>So, What’s your magic solution here?</h3><p>It’s actually pretty neat! To understand AppCenter’s Codepush (shhh… did I reveal the secret too soon!?), we need to deep-dive into how React-Native apps are built and leverage the usage of Javascript inside the native apps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*nLaCf_Fc5uJVK4G2FGF6Ww.png" /><figcaption>How React Native apps are bundled</figcaption></figure><p>At its core, React-Native apps consist of 2 parts: the Native Binaries and the Javascript bundle. While the native binary code remains static for most of the parts, until we add new SDKs, etc., the React code encompasses most of the codebase changes and is embedded into the app as a <em>Javascript bundle.</em></p><p>This minimized Javascript bundle gets loaded into the native apps every time you open a React-Native application. Since this codebase in this bundle is subject to constant change, it is mostly the reason for criticals and is subject to hotfix!</p><p>What if there was a way for us to remove the app crashing bundle and replace it with the new bundle that includes the hotfix? You are thinking, that would be magic, right? That’s where Codepush comes into the picture:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*6z4iupfpj1wznq5l33KXIA.png" /><figcaption>Replacing old bundles on the fly via Codepush</figcaption></figure><p>Since our app is React-Native based, we can leverage<a href="https://docs.microsoft.com/en-us/appcenter/distribution/codepush/"> Codepush</a>, which is an App Center cloud service that enables React Native developers to deploy mobile app updates directly to their users’ devices. It works by acting as a central repository where developers can publish certain updates (for example, JS, HTML, CSS and image changes), and apps can query for updates (using the provided client SDKs).</p><p>In short, we introduced <strong>Codepush on NewBrands! </strong>— a framework to deploy hotfix to end users in minutes! With our new system, the app itself syncs the new bundle in the background (for both Android and iOS) without the need for users to update to the latest build!</p><h3>So, you added Codepush and it just worked?</h3><p>Absolutely not!<br>We have a pretty big mobile infrastructure that needed to be modified to ensure that a delicate feature like Codepush is introduced without jeopardizing our app vitals!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*YN-cFgaEKBN-9VpCQ5-AFQ.png" /><figcaption>The entire mobile architecture shift while introducing Codepush</figcaption></figure><p>As you can see above, we created an end-to-end workflow that included Slack for bots, Vault for credentials, Bitrise as a workflow management tool, Sentry to upload the new bundle source maps, Appcenter SDK for analytics and finally Codepush to manage bundle updates to our android and iOS apps!</p><p>Thanks to the dedicated efforts from engineers across Toronto and Berlin, we were able to finish this initiative with complete automation within a month!</p><h3>Cool, I am starting to love this. Is this tried and tested?</h3><p>You bet it is! We recently released 2 hotfixes after our current app version, targeting all apps under new brands and successfully got <strong>700k</strong> apps hotfix-ed without the slightest change in the user experience. The app vitals through the process remained the same if not better.</p><p>We also slightly tweaked our release process to release reliably via Codepush. Here’s an overview:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*_g73V4EVG6eFBkeVGcXEFA.png" /><figcaption>Slight tweaks in the release process to work with Codepush</figcaption></figure><p>One recent example: our team introduced a crash when the user navigated through the edit flow through meal kits and reached addons. Pretty bad from both customer experience and business perspective as users could not complete their edit deliveries flow. Even though the fix was pretty simple, it would take 10 days for us to provide this hotfix to all our users, if we followed the traditional flow. Well, not anymore!</p><p>We created the hotfix, merged it and released it to all the users via Codepush within minutes! So, whenever the user downloaded/opened this buggy build, Codepush would sync the bundle in the background and provide the user with the updated build and the issue would magically disappear. Ain’t that amazing?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/144/1*1JeO3hpqqOASEEANruh68A.gif" /><figcaption><em>Step1: Identify the issue on Live builds</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/336/1*NyyZl5M69yZb3HDxKTcvAA.gif" /><figcaption><em>Step2: Release Codepush Bundle via AppCenter Dashboard</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/96/1*kGl7mLeJF9nLvxaX8TJTzA.gif" /><figcaption><em>Step3: App shows Splash screen, downloads the new bundle &amp;<br>Voila! The hotfix is deployed!</em></figcaption></figure><p>We had some amazing observations related to the release build timing as well. Remember I told you that “<em>the automated submission workflows take a very long time to run”, </em>we improved on that too! Here are a few vital ones:</p><ul><li>Hotfix rolled out to 100% audience in ~45 minutes<br>(instead of 3 days, <strong>98.9% reduction</strong>)</li><li>Android Codepush Release build time: 5 minutes<br>(instead of 15 mins, <strong>66% reduction</strong>)</li><li>iOS Codepush Release build time: 11 mins<br>(instead of 33 mins, <strong>66% reduction</strong>)</li></ul><h3>98.9% reduction? Out of this world! What’s next.?</h3><p>The feature is available in production for a month. 5 codepush hotfixes have been delivered for all the brands. The adoption from multiple teams has been very inspiring! We continue to monitor the app vitals and work on our automated workflows to add rollback and rollout options. Post the fantastic feedback from multiple teams, we continue towards version 2 of our initiative — “Every feature release is a Codepush release” — Coming soon!</p><p>PS: Look at Codepush’s adoption in our release process in the last month!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*l69VftukuSZFM_srQswkjg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ce324a93fb2" width="1" height="1" alt=""><hr><p><a href="https://engineering.hellofresh.com/reducing-app-hotfix-time-by-98-9-from-3-days-to-under-45-minutes-5ce324a93fb2">Reducing App Hotfix time by 98.9% 
(From 3 days to under 45 minutes)</a> was originally published in <a href="https://engineering.hellofresh.com/">HelloTech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[25% UI bugs? Let’s Visual Test ‘em!]]></title>
            <link>https://engineering.hellofresh.com/25-ui-bugs-lets-visual-test-em-e4e440de00fa?source=rss-81b6818eff3d------2</link>
            <guid isPermaLink="false">https://medium.com/p/e4e440de00fa</guid>
            <category><![CDATA[ui-test-automation]]></category>
            <category><![CDATA[visual-testing]]></category>
            <category><![CDATA[image-comparison]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[cypress]]></category>
            <dc:creator><![CDATA[Arbaaz Dossani]]></dc:creator>
            <pubDate>Fri, 08 Apr 2022 09:45:15 GMT</pubDate>
            <atom:updated>2022-04-11T07:50:36.464Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w8h74Md7StKsigO02ufrmg.jpeg" /><figcaption>Let’s Visual test ‘em!</figcaption></figure><h3>Hey… What is your problem?</h3><p>Having a multi-brand business like HelloFresh brings multiple technical obstacles. One of them is the constant changes in the user interface and continuous integration of new or acquired brands like EveryPlate or Green Chef into the HelloFresh codebase. In Q3 2021 the ratio of UI bugs was 25% of the total bugs count, which is very high as compared to the quality standards at Hellofresh. One out of four bugs that surfaced in New Brands Vertical were UI issues or related problems. Unfortunately, the problem doesn’t end here. With every new brand, our code becomes more prone to unwanted UI side-effects when changing the layout for a particular brand or a set of brands.</p><p>The following is one example of a problem we faced because of changes to the layout across multiple brands:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*qqU8KLvWCgnuB979-zeB9Q.png" /><figcaption>UI Issue on Plans Page for Everyplate. Ew!</figcaption></figure><h3>OK… How did you approach this problem?</h3><p>With the problem in UI, it was apparent that we looked into solving this by image comparisons and stylesheets testing. We looked into multiple tools to decide on which one serves our purpose the best:</p><ul><li><a href="https://github.com/spatie/browsershot">BrowserShot</a></li><li><a href="https://www.browsera.com/">Browsera</a></li><li><a href="https://www.browserstack.com/">BrowserStack</a></li><li><a href="https://github.com/jaredpalmer/cypress-image-snapshot">Cypress-Image-Snapshot</a></li></ul><p>Out of the above four tools, BrowserShot does not include CSS testing in its free versions. The other three, i.e. Browsera, BrowserStack and Cypress-Image-Snapshot more or less work on the same workflow and provide similar APIs.</p><p>We decided to proceed with Cypress-Image-Snapshot for two basic reasons, because it would work very well with the existing Cypress setup and because the Web-Infrastructure team has already added the plugin, which wasn’t used before and only needed to be leveraged.</p><h3>Hmmm… What Do you Propose?</h3><p>In order to develop UI robustly considering all brands, we plan to introduce Visual Testing in two forms.</p><ol><li>Image Snapshot Testing: Uses PixelMatch and Jest Image Snapshot to provide snapshot comparisons for particular pages or components.</li><li>Visual CSS Testing: Finds a particular element and inspects its vital CSS properties to static check whether the component is rendering as expected.</li></ol><h3>Ahh… Can you show me an example?</h3><p>In order to initiate the Cypress Visual Testing for Whitelabel, the following four steps can be implemented:</p><ol><li><strong>Creating the snapshot:<br></strong>Create the setup for Cypress Image Snapshots and decide on the valid configurations. Leverage the matchImageSnapshot() from the Cypress-Image-Snapshot plugin and decide on the valid configurations for the same.</li></ol><pre>cy.get(SELECTOR_FOR_TARGET_CONTAINER).matchImageSnapshot(</pre><pre>  `${systemCountry}_NAME_OF_THE_TEST`,</pre><pre>  {</pre><pre>    failureThreshold: 0.1,</pre><pre>    failureThresholdType: &#39;percent&#39;,</pre><pre>    customSnapshotsDir: path.join(__dirname, &#39;snapshots&#39;),</pre><pre>    customDiffDir: path.join(__dirname, &#39;snapshots&#39;, &#39;diff&#39;),</pre><pre>  }</pre><pre>);</pre><p><strong>2.</strong> <strong>Snapshot Generation:<br></strong>Create test suites for Static Content (FAQ page). Here’s how the snapshot is generated:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*PjrkJ8VTp5J4rEw8zI1lWg.png" /><figcaption>FAQ component UI snapshot!</figcaption></figure><p>3. <strong>CI workflow:</strong> <br>Currently, these tests run on a Github Action cron job every 15 minutes automatically testing the live environment with the saved snapshot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*45dwtCLqDIsmINDdBPxyBA.png" /></figure><p><strong>4. Monitoring and Alerts: <br></strong>Tracing is implemented using Honeycomb, so we can have a real-time view on our dashboard about the data on test failures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*vRobO_qd8Ed0pJAjWAO6MA.png" /><figcaption>Dashboard to check for failed UI tests</figcaption></figure><p>On a certain threshold of our test failure, we also trigger an alert to the team in the following 2 ways:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*eM-5Z24WzQU0tQrJVYe92Q.png" /><figcaption>Automated Alerting process for UI Test failures</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*dQajLL7OMGb-ZQK3Kc1_Jg.png" /><figcaption>Auto-populate Google Sheet for a cumulative result analysis</figcaption></figure><h3>Impressive… Are these tests Efficient?</h3><p>One of the misconceptions about UI tests is that they are usually flaky as there can be differences in viewport or contrast settings on the system on which these snapshots are taken and take a very long time to execute. We tackled this in two ways: In order to guarantee efficient testing, we mocked a collection of APIs to make sure that the irrelevant API delays do not cause an increase in test execution time. For our results, the passing test case usually takes about three seconds to finish and a failed test (retried three times) usually takes around six seconds each, which is very much comparable to a common test that we write. Additionally, we made it a norm to not test the entire page, but rather test individual isolated components to make sure our tests are not flaky.</p><p>That way, we could guarantee that any change or failure in the snapshot is directly related to some intentional or unintentional UI changes for that particular component.</p><h3>Coolio! … What are the test results so far?</h3><p>So far, we have collected many UI changes and we categorise these results into two categories: intentional changes and critical UI bugs.</p><p>Intentional changes mean the UI tests failed when a component was updated but the snapshot was not. This is also a very good way to automate UI checks while working on a target component. The Login screen below is a good example of it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tFL1VY-ZKEGDDhFpPWbadA.png" /><figcaption>Contentful asset changed, and the test failed while comparing with the old snapshot</figcaption></figure><p>Catching critical UI bugs is the main aim of this exercise. We recently caught a UI bug around our Edit Delivery action button on the main page of the website. Below we can see the issue and the snapshot difference that our UI test caught and alerted:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*CKIVFYFZclNaVLFamzdh_g.png" /><figcaption>On Responsive screens, the Edit Delivery Button UI was distorted.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5rkS5n2EEEHBOKcHEVM6UA.png" /><figcaption>Snapshot test showing difference caught while comparing with the snapshot</figcaption></figure><h3>Bingo! … What are your next steps then?</h3><p>Now that the end-to-end setup looks complete, we are looking to explore testing mobile viewports and continuously improving coverage to increase the chances of preventing or capturing critical UI bugs in production. We will monitor the results in the current quarter to check the ratio of critical UI bugs versus intentional UI changes caught by our Visual Tests.</p><p>One of our core DNA at Hellofresh is data drivenness. Once we are assured that these new types of tests are giving the desired results, we will include these tests into our regular development process and provide a great UI experience for our end users!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e4e440de00fa" width="1" height="1" alt=""><hr><p><a href="https://engineering.hellofresh.com/25-ui-bugs-lets-visual-test-em-e4e440de00fa">25% UI bugs? Let’s Visual Test ‘em!</a> was originally published in <a href="https://engineering.hellofresh.com/">HelloTech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How we reduced NewBrands App Size by over 70%]]></title>
            <link>https://engineering.hellofresh.com/how-we-reduced-newbrands-app-size-by-over-70-1f3f7086b450?source=rss-81b6818eff3d------2</link>
            <guid isPermaLink="false">https://medium.com/p/1f3f7086b450</guid>
            <category><![CDATA[hellofresh]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[app-optimization]]></category>
            <dc:creator><![CDATA[Arbaaz Dossani]]></dc:creator>
            <pubDate>Mon, 11 Oct 2021 11:50:44 GMT</pubDate>
            <atom:updated>2021-10-11T11:50:44.276Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*kNiO_Hu3OQdDAo47" /></figure><p>When I joined HelloFresh in April’21 as a Frontend Engineer in New Brands Retention Tribe, I had this very naive question to the team:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/0*r0OHzbaAzHQEpyEV" /></figure><p>The react native app build for all the New Brands (EveryPlate, GreenChef, ChefsPlate) soon to be built for new additions (Factor, GoodChop) were all very large (<strong>~44MB</strong>) for an application in our domain.</p><p>Moreover, the app size kept increasing regularly, with addition of node modules and associated libraries. Soon we hit the <strong>50MB</strong> mark.</p><p>Now you may ask.. What’s wrong with that?</p><p>A lot of things actually, but most importantly the following:</p><ul><li>Out App size was more than <strong>2X</strong> of our competitors’ median size (<strong>23.8MB</strong>), which could indicate that we were surely not following the best practices</li><li>Larger apps naturally rank lower in organic Play Store rankings</li><li>Unneeded files were being included in the build</li><li>A big, bloated app loads and runs slower on many devices</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/357/0*kFZG_8BILrhXsvP7" /></figure><h3>Where the hell did we go wrong!?</h3><p>Short answer: Somewhere and nowhere, really!</p><p>In my preliminary analysis, I found that a few of the unused dependencies could be immediately eliminated, but they were not the major culprits.</p><p>Thanks to Android Studio’s App Analyzer in-built, I found a SDK related to Scanning Cards for Payment on Apps which was bundling a very large library for all android architectures, which was adding 13MB to the App size</p><p>Voila! After hours of scratching my head, I had some path to follow.</p><h3>Did you dump the Card Component?</h3><p>Short answer: Yes and No, really!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/0*qdJh5GqymzJdL0dx" /></figure><p>I decided to step back and look at the bigger picture. Following this line of enquiry, I discovered that our CI pipeline which build our Android app and deploys to Play Store follows a traditional<a href="https://en.wikipedia.org/wiki/Android_application_package"> APK</a> deployment flow.</p><p>In simple terms, this means that the workflow is building 1 large 50MB file for all android based operating systems and architectures.</p><p>That means, my app included unnecessary libraries, assets and files not needed for each customer’s device!</p><h3>If no APK, then what!?</h3><p>Should I reveal the secret? Here it goes…</p><p>Android App Bundle (AAB):</p><blockquote>An <em>Android App Bundle</em> is a publishing format that includes all your app’s compiled code and resources, and defers APK generation and signing to Google Play.</blockquote><p>Err.. simpler term please?</p><p>Ok.. With AAB, you don’t generate 1 large file, but instead create a bundle from which the PlayStore will selectively generate APKs suitable to different android operating systems and architecture.</p><p>Nice! Look at this stat now..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/813/0*EymdvQiK3Yg7QzLp" /></figure><p>With AAB, the bundle size that is generated and uploaded to PlayStore is equivalent to an APK, but the download size on the user’s end for new installs and app updates is drastically reduced !</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Nm6-JP0uAX0FuXyu" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NCYCdmacLwF0QeKW" /></figure><p>The best thing about this is that even if a Node Module adds a very large set of libraries like in case of our Card Scanning module, the selective APK would pick up only one of those library according to its architecture. With the diagram above, we can see that, all the libraries that we use now only contribute to <strong>10MB</strong> of app size.</p><h3>Was the APK to AAB transition easy?</h3><p>Hell no!</p><p>Since the CI flow had been running for a while, it had its own strict set of workflows which were difficult to mend. Thanks to our Squad Leads and Tribe Lead who supported this initiative so well, it took the team a couple of months to prioritise and come up with a solution to make the CI workflow produce an AAB.</p><p>Exhausting, but rewarding!</p><h3>Ready for the magic?</h3><p>After uploading the app to PlayStore early September, we were super anxious about the results!</p><p>The Stats that followed are nothing but magic to our eyes!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/0*OOh3ebY9cBceeT9q" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/0*m8irBSX9bPWrHGL4" /></figure><p>We were able to reduce the app size to between <strong>9.32MB — 20.3MB, </strong>which is not only 60% less than our previous builds, but also <strong>4MB</strong> less than our competitors’ apps. The bonus part is that we were able to get this result for all our apps, in the deployment workflow for all of them at the same time!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Bcot_PqQOkkS51Vc" /></figure><p>We continuously monitored the vitals on PlayStore for a week to make sure that we did not compromise on the App Performance in any way. Luckily, all the stats look as good if not better than the previous builds!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*xkCmk2Li35rxw8eP" /></figure><h3>Are you happy now?</h3><p>We are never content with the current stats of our apps and continuously strive to improve in the direction of following the best practices.</p><p>We still think that the App download size can be reduced a further 4–5MB, and we are working in that direction!</p><p>We continue to monitor if this drastic change organically improves our ranking on the PlaySore and we are positive!</p><p>Until the next fascinating news, Greetings from everyone in the NewBrands Team!</p><p>P.S: I really love that at HelloFresh, we value initiatives and turn them into tangible goals! Continuous Learning in HelloFresh DNA is perfectly demonstrated!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f3f7086b450" width="1" height="1" alt=""><hr><p><a href="https://engineering.hellofresh.com/how-we-reduced-newbrands-app-size-by-over-70-1f3f7086b450">How we reduced NewBrands App Size by over 70%</a> was originally published in <a href="https://engineering.hellofresh.com/">HelloTech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>