<?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 SG on Medium]]></title>
        <description><![CDATA[Stories by SG on Medium]]></description>
        <link>https://medium.com/@shwetagulati.16march?source=rss-0f269a115594------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*MnCT-kcvSFOo-XNLSH2vtQ.jpeg</url>
            <title>Stories by SG on Medium</title>
            <link>https://medium.com/@shwetagulati.16march?source=rss-0f269a115594------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 08:38:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shwetagulati.16march/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[The Flaky Test Question That Separates Senior QA Engineers From Juniors]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@shwetagulati.16march/the-flaky-test-question-that-separates-senior-qa-engineers-from-juniors-dec2878574a2?source=rss-0f269a115594------2"><img src="https://cdn-images-1.medium.com/max/1672/1*IPdcrXwTihJ_gBiO8qw__A.jpeg" width="1672"></a></p><p class="medium-feed-snippet">What I check first, why retries are a smoke alarm, and the one rule that cut our false failures</p><p class="medium-feed-link"><a href="https://medium.com/@shwetagulati.16march/the-flaky-test-question-that-separates-senior-qa-engineers-from-juniors-dec2878574a2?source=rss-0f269a115594------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@shwetagulati.16march/the-flaky-test-question-that-separates-senior-qa-engineers-from-juniors-dec2878574a2?source=rss-0f269a115594------2</link>
            <guid isPermaLink="false">https://medium.com/p/dec2878574a2</guid>
            <category><![CDATA[playwright-community]]></category>
            <category><![CDATA[playwright-automation]]></category>
            <category><![CDATA[test-automation]]></category>
            <category><![CDATA[automation-testing]]></category>
            <category><![CDATA[qa]]></category>
            <dc:creator><![CDATA[SG]]></dc:creator>
            <pubDate>Mon, 09 Nov 2026 13:17:37 GMT</pubDate>
            <atom:updated>2026-11-10T10:02:19.634Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[We Moved from Cypress to Playwright Because of Tabs]]></title>
            <link>https://medium.com/@shwetagulati.16march/we-moved-from-cypress-to-playwright-because-of-tabs-66cc2384adb7?source=rss-0f269a115594------2</link>
            <guid isPermaLink="false">https://medium.com/p/66cc2384adb7</guid>
            <category><![CDATA[quality-assurance]]></category>
            <category><![CDATA[cypress]]></category>
            <category><![CDATA[test-automation-framework]]></category>
            <category><![CDATA[playwrights]]></category>
            <category><![CDATA[software-testing]]></category>
            <dc:creator><![CDATA[SG]]></dc:creator>
            <pubDate>Wed, 04 Nov 2026 15:07:08 GMT</pubDate>
            <atom:updated>2026-11-04T15:07:08.193Z</atom:updated>
            <content:encoded><![CDATA[<p>Our team moved from Cypress to Playwright for one reason: tabs. Cypress runs a test in one tab, and our app needed more than one.</p><p>We always had CI. This isn’t a “tests only on my laptop” story. It’s about what changed when we switched.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wknCBdopgtaW88Aen7Mgrw.jpeg" /></figure><h3>What I liked about Cypress</h3><p>Cypress had the reports that were easiest on the eyes. But looking back, that was just making it look easy.</p><h3>How Playwright handles a new tab</h3><p>In Playwright, a new tab is just another page. You wait for it to open, then test it like any other page:</p><p>ts</p><pre>const newTabPromise = context.waitForEvent(&#39;page&#39;);<br>await page.getByRole(&#39;link&#39;, { name: &#39;Open&#39; }).click();<br>const newTab = await newTabPromise;<br>await newTab.waitForLoadState();<br>await expect(newTab).toHaveURL(/report/);</pre><p>No workarounds. The test does what the user does.</p><h3>4 batches, 20 tests each</h3><p>In Cypress, we split our tests into batches by hand: 4 batches, 20 tests each.</p><p>When a test was added to the wrong batch, shared users sometimes caused a race condition, and 2 or 3 tests would fail. Then I had to run them in a loop locally to check, and read the reports. It cost us time.</p><p>In Playwright, we don’t split anything by hand. We just set workers:</p><p>ts</p><pre>// playwright.config.ts<br>import { defineConfig } from &#39;@playwright/test&#39;;</pre><pre>export default defineConfig({<br>  fullyParallel: true,<br>  workers: process.env.CI ? 4 : undefined,<br>});</pre><h3>My worst flaky test</h3><p>My worst flaky test was because of shared test users. It was green locally and red in CI, for the same reason.</p><p>Running it in a loop locally helped reveal the fault:</p><p>bash</p><pre>npx playwright test checkout.spec.ts --repeat-each=20 --workers=4</pre><p>One way to stop it is to give each worker its own test user:</p><p>ts</p><pre>const username = `qa-user-${test.info().parallelIndex}`;</pre><h3>Switching to TypeScript overnight</h3><p>The hardest part of the migration wasn’t Playwright. It was switching to TypeScript overnight.</p><p>I was reading Promise everywhere and not knowing what it meant. Seeing async everywhere, and =&gt;, and getting overwhelmed.</p><p>So I turned to ChatGPT and Claude and made them explain it to me like I was 5. I did some harmless quizzes and wrote code in online editors, like map, filter and reduce, to understand.</p><h3>What we run now</h3><ul><li><strong>Every push and merge to main:</strong> 20 smoke tests</li><li><strong>Nightly:</strong> 90 regression tests</li></ul><p>Smoke tests give quick feedback on every push. The full regression suite runs at night, when nobody is waiting for it.</p><p>To run only the smoke tests, tag them and filter by tag:</p><p>ts</p><pre>test(&#39;user can log in&#39;, { tag: &#39;@smoke&#39; }, async ({ page }) =&gt; {<br>  // ...<br>});</pre><p>bash</p><pre>npx playwright test --grep @smoke</pre><h3>The interview questions that always come up</h3><p>In QA automation interviews, it’s always the same two questions:</p><ol><li>Tell me about a scenario you found difficult to automate.</li><li>Tell me about a test you found flaky.</li></ol><p>Mine are both in this article. Here’s how I answer them.</p><h4>“A scenario you found difficult to automate”</h4><p>My answer is the multi-tab flow. Our app opens a new tab, and Cypress runs a test in one tab. So we couldn’t test that flow the way a real user uses it. That was the reason our team moved to Playwright, where a new tab is just another page you wait for and test.</p><p>The second reason was parallel runs. In Cypress, we split our tests into 4 batches by hand to keep CI fast, and one test in the wrong batch could break others. Playwright has parallel workers built in, so it spreads the tests for us. That’s one of the biggest reasons teams move to Playwright: it’s free in the open-source runner, with no extra setup.</p><p>What the interviewer wants to hear: you understood <em>why</em> it was hard (a tool limit, not just “the test failed”), and you found a way forward.</p><h4>“A test you found flaky”</h4><p>My answer is shared test users. Tests passed locally and failed in CI. When a test landed in the wrong batch, two tests used the same user at the same time. That race condition failed 2 or 3 tests at once. I found it by running the test in a loop locally until it broke.</p><p>What the interviewer wants to hear: the real cause, how you found it, and how you stop it from happening again. “I just added a retry” is the answer they don’t want.</p><h4>How to prepare your own</h4><ul><li>Pick one hard scenario and one flaky test from your real work.</li><li>For each one, know four things: what happened, why it happened, how you found out, and what you changed.</li><li>Use real numbers. “2 or 3 tests failed” sounds better than “some tests failed.”</li></ul><h3>Was it worth it?</h3><p>Yes. One word: time.</p><p>Time we used to spend splitting tests into batches by hand. Time spent running failed tests in a loop locally and reading reports, just to prove a failure wasn’t a real bug.</p><p><em>Have you moved from Cypress to Playwright? What was the hardest part for you? Tell me in the comments.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=66cc2384adb7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>