<?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 Usman Ghani on Medium]]></title>
        <description><![CDATA[Stories by Usman Ghani on Medium]]></description>
        <link>https://medium.com/@syed.usman.ghani?source=rss-bc85ccec31d2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*xZ36Z_aqrtxTz-k9</url>
            <title>Stories by Usman Ghani on Medium</title>
            <link>https://medium.com/@syed.usman.ghani?source=rss-bc85ccec31d2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 11:10:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@syed.usman.ghani/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[Stop Wishing, Start Prompting]]></title>
            <link>https://medium.com/emumba/stop-wishing-start-prompting-134d32e2e603?source=rss-bc85ccec31d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/134d32e2e603</guid>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[prompt-engineering]]></category>
            <dc:creator><![CDATA[Usman Ghani]]></dc:creator>
            <pubDate>Mon, 22 Sep 2025 09:31:49 GMT</pubDate>
            <atom:updated>2025-09-22T09:31:49.673Z</atom:updated>
            <content:encoded><![CDATA[<h4>Practical Strategies to Get the Results You Want from AI</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9k3VPCSq2TVR7X3e" /></figure><p>We often type a sentence into an AI model and expect it to “just get it.” When the answer falls short, we assume the model is weak. In reality, most failures come from underspecified prompts. Language models are pattern machines; they respond best to clear roles, precise tasks, rich context, explicit constraints, and a target format.</p><p>Large language models don’t “understand” like humans. They predict the next token given your input. If the input is vague, the output will be plausible but unfocused. If the input is specific and structured, the model’s search space narrows and quality rises. Clear prompts reduce ambiguity, improve reproducibility, and make it easier to evaluate whether the response meets your goal.</p><p>This guide provides examples of prompts that consistently yield the desired outcomes. You’ll see concrete examples in plain text, Markdown, and JSON.</p><h3>Key building blocks</h3><p>Think of a good prompt as a compact spec:</p><ul><li><strong>Role</strong>: who the model should “be.”</li><li><strong>Task</strong>: exactly what to produce.</li><li><strong>Context</strong>: domain, audience, constraints, source material.</li><li><strong>Output format</strong>: Markdown, JSON, or simple text with headings.</li><li><strong>Examples</strong>: a few mini demos of desired inputs and outputs.</li><li><strong>Quality bar</strong>: acceptance criteria or a brief rubric.</li></ul><p>You don’t always need every piece, but each one reduces guesswork.</p><h3>Prompt Strategies</h3><h4>Add role + task + format</h4><ul><li>Weak prompt</li></ul><blockquote>Explain Kubernetes.</blockquote><ul><li>Better prompt</li></ul><pre>Role: You are a technical instructor for junior developers.<br>Task: Explain Kubernetes in simple terms with one analogy and one real-world example.<br>Audience: Developers new to containers (0–6 months experience).<br>Format: Markdown with H2 headings and a 5-item glossary.<br>Constraints: Keep it under 300 words; avoid marketing jargon.</pre><p><strong>Why it works</strong>: you’ve constrained scope, matched tone to audience, and set a verifiable format. The analogy and example anchor the explanation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YYfhLA6Lb03iuGpL" /></figure><h4>Use delimiters to isolate context</h4><p>Models can blur instructions with data. Delimiters keep them separate.</p><pre>Summarize the article inside &lt;&lt;&lt;CONTEXT&gt;&gt;&gt; in 5 bullet points for executives.<br>Return only the summary, no preface text.<br><br>&lt;&lt;&lt;CONTEXT&gt;&gt;&gt;<br>[Paste article here]<br>&lt;&lt;&lt;CONTEXT&gt;&gt;&gt;</pre><p><strong>Tip:</strong> triple backticks, XML tags, or custom tokens all work. The point is consistent boundaries.</p><h4>Request structured outputs</h4><p>If another tool needs to parse the answer, request JSON with a minimal schema. This turns prose into data.</p><p>Plain text request → JSON output</p><pre>Extract company insights from the review below. Return valid JSON only.<br><br>Schema:<br>{<br>  &quot;company&quot;: string,<br>  &quot;sentiment&quot;: &quot;positive&quot; | &quot;neutral&quot; | &quot;negative&quot;,<br>  &quot;aspects&quot;: string[],   // e.g., [&quot;support&quot;, &quot;pricing&quot;]<br>  &quot;summary&quot;: string<br>}<br><br>Review:<br>&quot;&quot;&quot;<br>Switching to Acme reduced our monthly bill, but their support replies were slow at first…<br>&quot;&quot;&quot;</pre><p><strong>Why it works:</strong> the schema narrows choices and reduces free-form rambling.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*krYOmhaz3or5VcIW" /></figure><h4>Few-shot prompting (show, don’t just tell)</h4><p>Provide one to three miniature examples that demonstrate the pattern you expect.</p><pre>You are a resume editor. Improve concision and impact.<br><br>Examples:<br>Input: &quot;Responsible for managing CI/CD.&quot;<br>Output: &quot;Owned CI/CD pipelines, cutting build times 35%.&quot;<br><br>Input: &quot;Worked on frontend tasks.&quot;<br>Output: &quot;Built React components used by 120k MAU; reduced bundle size 18%.&quot;<br><br>Task:<br>Rewrite the following bullet in the same style, max 18 words:<br>&quot;Helped with API documentation for internal teams.&quot;</pre><p><strong>Why it works:</strong> examples anchor tone, length, and structure. The model imitates patterns more reliably than abstract instructions.</p><h4>Plan–Then–Produce (without exposing internal reasoning)</h4><p>Encourage the model to plan, but ask it to output only the final product and a brief rationale. A <strong>rationale</strong> is a brief “why” statement that follows an answer. It summarizes the key reason or trade-off behind the output, without showing step-by-step thinking.</p><p><strong>Template</strong></p><pre>Task: Draft a 2-paragraph risk assessment for migrating from MySQL to Postgres.<br><br>Process: First plan the outline internally. Then produce the final text.<br>Output: Provide only the final assessment plus a 2-sentence rationale explaining the main trade-off.</pre><p><strong>Output</strong></p><pre>[Two concise paragraphs with the assessment.]<br><br>Rationale: Prioritized data consistency over write latency because payment records must be correct; key risks are replication lag and type differences.</pre><p><strong>Why it works:</strong> nudges the model to think before writing, yet keeps the output tight and auditable.</p><h4>Add a lightweight rubric</h4><p>A <strong>rubric</strong> is a tiny scoring guide that turns “this looks good” into something you can test and repeat. Instead of relying on gut feel, you define 3–5 criteria (for example, accuracy, clarity, usefulness) and a simple scale (0–5).</p><p>The model then checks its own output against those criteria, or you can use the rubric to review results after generation.</p><p>Benefits:</p><ul><li>Quality is measurable</li><li>Helps you compare multiple drafts</li><li>Accelerates iteration</li></ul><p>Rubric design checklist (keep it light):</p><ul><li>Pick <strong>3–5 criteria</strong> aligned to your goal and audience.</li><li>Use a <strong>0–5 scale</strong> with short descriptions (0 = missing, 5 = excellent).</li><li>Make each criterion <strong>observable</strong> (avoid vague words like “nice”).</li><li>Set a <strong>pass threshold</strong> (e.g., average ≥4) so “good enough” is clear.</li></ul><p>Here’s the clean flow:</p><ol><li>Generate a draft</li></ol><pre>Task: Write a 2-paragraph intro to Kubernetes for beginners.<br>[MODEL OUTPUT = the draft we will evaluate]</pre><p><strong>2.</strong> Evaluate the draft using the rubric</p><pre>Act as a peer reviewer. Evaluate the response below against this rubric (0–5 each):<br>- Accuracy<br>- Clarity<br>- Usefulness<br><br>Return a JSON scorecard only (valid JSON, no comments) with:<br>{ &quot;scores&quot;: {...}, &quot;average&quot;: number, &quot;pass_threshold&quot;: 4, &quot;passed&quot;: boolean, &quot;improvement_tip&quot;: string }<br><br>If average &lt; pass_threshold, add one focused tip that would raise the lowest score on the next draft.<br><br>RESPONSE TO EVALUATE:<br>&lt;&lt;&lt;MODEL OUTPUT FROM STEP 1&gt;&gt;&gt;</pre><p><strong>3.</strong> Revise</p><pre>Revise the draft below. Keep structure; target the lowest-scoring criterion first.<br>Return only the improved draft.<br><br>DRAFT:<br>&lt;&lt;&lt;MODEL OUTPUT FROM STEP 1&gt;&gt;&gt;<br>TIP:<br>&lt;&lt;&lt;improvement_tip from scorecard&gt;&gt;&gt;</pre><h4>Iterative prompting: tighten with deltas, not rewrites</h4><p>When the model misses, don’t start over. Give a targeted correction. But…</p><p>Models are not mind readers. Your <strong>first prompt should contain ~80% of what you already know</strong> about the desired outcome: the goal, audience, scope, format, constraints, and success criteria. Leave only the final 20% for iteration. If you cannot articulate that first 80%, pause and define it; otherwise, you’ll get plausible fluff.</p><p><strong>Weak Start</strong></p><blockquote>Explain Kubernetes.</blockquote><p><strong>80% Start</strong></p><pre>Role: Senior instructor for junior developers (0–6 months with containers).<br>Task: Explain Kubernetes in plain language so a beginner can describe what it does and why it’s useful.<br>Audience: New developers; no prior K8s experience.<br>Scope: What it is, how it schedules/replicates containers, why teams use it.<br>Format: Markdown with an H2 “Overview” containing exactly two paragraphs, then an H2 “Glossary” with 3 items.<br>Constraints: 160–220 words total; define acronyms on first use; include ONE sports analogy and ONE real-world example (autoscaling a web app); avoid marketing language.<br>Acceptance Criteria: Mentions pods, nodes, scaling; the example shows traffic spikes; no unexplained jargon.</pre><p>This first prompt is already precise and testable. Now the model has a small search space and is more likely to hit your target on the first pass, but if you feel some points are missed, revise the request.</p><pre>Revision request (for the draft you just produced):<br>- Keep the existing structure and headings.<br>- Reduce Paragraph 2 in “Overview” by ~40% to remove repetition.<br>- Replace the sports analogy with a logistics metaphor (warehouses, shipments).<br>- Add a one-line TL;DR at the very top (≤ 20 words).<br>Return only the revised Markdown.</pre><p>This preserves the useful parts, speeds convergence, and keeps the model aligned with your original intent. The 80–20 approach sets the target; <strong>delta revisions</strong> walk the last mile.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UtP6ghcPeMh7fKOC" /></figure><p>Before you hit Enter, decide how you’ll use the response. Format isn’t decoration; it sets boundaries for the model and influences what happens next, whether you’ll skim it with a teammate, paste it into a document, or pipe it into a script. Choose the right container up front to boost accuracy, enable reuse, and make review easier.</p><h3>Pick the Right Output Format</h3><h4>Simple text</h4><p>Best for quick tasks, brainstorming, or where human reading is primary. Keep instructions compact and explicit. Use delimiters to separate instructions and data.</p><h4>Markdown</h4><p>Ideal when structure matters to humans: headings, lists, code blocks, callouts. You can specify section counts, required headings, or tables.</p><pre>## Executive Summary<br>[80–120 words]<br><br>## Risks<br>- [3 bullets]<br><br>## Mitigations<br>- [3 bullets]</pre><h4>JSON</h4><p>Best for machine-readability, pipelines, and validations. Always define a mini schema, required fields, and value ranges. Ask for “valid JSON only, no comments.”</p><pre>{<br>  &quot;title&quot;: &quot;Weekly Incident Report&quot;,<br>  &quot;incidents&quot;: [<br>    {<br>      &quot;id&quot;: &quot;INC-2025-09-16-01&quot;,<br>      &quot;severity&quot;: &quot;high&quot;,<br>      &quot;systems&quot;: [&quot;billing-api&quot;, &quot;redis-cache&quot;],<br>      &quot;impact_summary&quot;: &quot;string&quot;,<br>      &quot;customer_visible&quot;: true<br>    }<br>  ],<br>  &quot;owner&quot;: &quot;SRE on-call&quot;<br>}</pre><h3>Conclusion</h3><p><strong>Good prompting is an applied specification.</strong> When you define role, task, context, constraints, and format, you remove ambiguity and give the model something concrete to optimize against. Start simple, add structure where it pays off, and evolve to include examples, rubrics, and iterative refinement as you progress.</p><p>Happy Learning!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=134d32e2e603" width="1" height="1" alt=""><hr><p><a href="https://medium.com/emumba/stop-wishing-start-prompting-134d32e2e603">Stop Wishing, Start Prompting</a> was originally published in <a href="https://medium.com/emumba">Emumba</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Playwright vs. WebdriverIO: How to Choose the Right Framework?]]></title>
            <link>https://medium.com/emumba/playwright-vs-webdriverio-how-to-choose-the-right-framework-512f428f7f86?source=rss-bc85ccec31d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/512f428f7f86</guid>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[sdet]]></category>
            <category><![CDATA[ui-testing]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[Usman Ghani]]></dc:creator>
            <pubDate>Mon, 15 Sep 2025 12:31:39 GMT</pubDate>
            <atom:updated>2025-09-15T12:31:39.554Z</atom:updated>
            <content:encoded><![CDATA[<h4>Guide for SDETS/QA to choose between the two frameworks</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UcM0HODBvOQGEL2x" /></figure><p>You’ve got a web app to ship and a mandate to “get UI automation running this sprint.” Two names dominate the conversation: <strong>Playwright</strong> and <strong>WebdriverIO (WDIO)</strong>. Both are powerful, both are popular — and both can pass your smoke suite tomorrow. So which one should you bet on?</p><p>This guide offers a practical, beginner-friendly comparison and a straightforward decision-making path, enabling you to choose confidently and start shipping tests.</p><p>Choosing a framework isn’t just a tooling preference — it shapes your <strong>developer experience</strong>, <strong>test stability</strong>, <strong>CI/CD setup</strong>, and even <strong>team onboarding</strong>. Make an incompatible choice and you’ll spend weeks fighting flaky waits, puzzling over integrations, or wrestling with a plugin ecosystem you didn’t need. Pick right and you’ll be writing reliable, maintainable tests by the end of the day.</p><h3>What “DX” Means</h3><p>Developer Experience (DX) is the overall quality of a developer’s journey with a tool. It spans installation, first run, day-to-day authoring, debugging, and scaling in CI. Good DX lowers cognitive load and removes busywork: it turns common failures into clear, actionable feedback so you spend time testing product risks, not wrestling the framework.</p><p>In this blog’s comparison, “great DX” means the framework helps you with:</p><ul><li><strong>Fast setup &amp; time‑to‑first‑test</strong> — minimal steps to install, scaffold, and see a passing test.</li><li><strong>Clear docs &amp; error messages</strong> — answers are easy to find; failures explain what to fix next.</li><li><strong>Good defaults</strong> — sensible APIs, resilient locators, and built‑in auto‑waiting so you write less glue code.</li><li><strong>Built‑in tooling</strong> — trace/screenshot/video artefacts, codegen, and helpful CLIs/UX for triage.</li><li><strong>Easy CI integration &amp; parallel runs</strong> — straightforward Docker/Actions examples and horizontal scale without extra plumbing.</li></ul><p><strong>How does this map in our Playwright vs. WebdriverIO context:</strong></p><ul><li>With Playwright, DX shows up in a batteries-included test runner, the Locator API’s auto-waiting, and the Trace Viewer, which ships by default.</li><li>With <strong>WebdriverIO</strong>, DX shows up as the interactive config wizard, a rich services ecosystem (cloud grids, reporters, image comparison), and first‑class BDD via Cucumber when teams prefer feature files.</li></ul><p>Throughout this comparison, we’ll use these DX criteria to help you map each framework’s strengths to your project’s needs.</p><h3>Hands‑on DX: getting your first test green</h3><h4><strong>Playwright quick start (TypeScript)</strong></h4><pre>// tests/example.spec.ts<br>import { test, expect } from &#39;@playwright/test&#39;;<br><br><br>test(&#39;homepage has docs link&#39;, async ({ page }) =&gt; {<br>await page.goto(&#39;https://example.com&#39;);<br>await expect(page.getByRole(&#39;link&#39;, { name: &#39;More information...&#39; })).toBeVisible();<br>});</pre><ul><li><strong>DX lens:</strong> npx playwright test gives you parallel runs, an HTML report, traces, screenshots, videos, and a powerful Locator API that re-queries the DOM and waits for actionability conditions automatically.</li><li>Result: excellent <strong>time-to-first-green</strong> with strong defaults for stability.</li></ul><h4>WebdriverIO quick start (Mocha style):</h4><pre>// test/specs/example.e2e.js<br>describe(&#39;homepage&#39;, () =&gt; {<br>   it(&#39;shows docs link&#39;, async () =&gt; {<br>       await browser.url(https://medium.com/&#39;https://example.com&#39;);<br>       const link = await $(&#39;=More information...&#39;);<br>       await expect(link).toBeDisplayed();<br>   });<br>});</pre><ul><li><strong>DX lens:</strong> npx wdio run wdio.conf.js (created via the interactive config wizard) plus, services and reporters give you great <strong>customizability</strong>, especially if your org standardizes on Selenium/WebDriver, cloud grids, or BDD.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oSEIKyJ2kypbhXh2" /></figure><h3>Stability and flakiness (DX factor: good defaults)</h3><p>Flaky tests are usually timing problems disguised as bugs.</p><ul><li><strong>Playwright’s Locator + auto‑waiting</strong> reduces the need for explicit waits. It waits for the element to be visible, stable, and ready for interaction before clicking or asserting. <strong>Cause → effect → implication:</strong> fewer timing bugs → fewer retries → <strong>more trust</strong> in nightly runs.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*tatJj9Et1A9Ps50e" /></figure><ul><li><strong>WebdriverIO</strong> offers implicit waits, e.g. waitUntil, and matcher helpers (e.g., toBeDisplayed). It’s powerful and flexible, but in practice, you may sprinkle more explicit waits or use helper utilities to achieve the same “always stable” feel that Playwright bakes in by default.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PGrF7BLKgnF4xR5W" /></figure><h3>Docs, errors, and onboarding (DX factor: clarity)</h3><ul><li><strong>Playwright</strong> has highly opinionated docs and examples that match the shipped defaults (runner, fixtures, locators). Error messages often point to actionability issues and suggest fixes.</li><li><strong>WebdriverIO</strong> has comprehensive docs across many stacks (Mocha/Jasmine/Cucumber), plus an interactive config wizard. Breadth is a strength; for beginners, the flexibility means a few more choices up front.</li></ul><h3>CI/CD and parallelism (DX factor: easy scaling)</h3><h4><strong>Playwright</strong>:</h4><ul><li>Parallelization is native; The Playwright <strong>test runner</strong> has built‑in scheduling and concurrency. It automatically splits your tests across multiple <strong>worker processes</strong> without extra plugins. You control it with a single setting or CLI flag.</li><li>GitHub Actions examples and Docker images are straightforward.</li><li>You get the reliable artefacts (traces, screenshots, videos, HTML report) by default.</li><li>Playwright’s concurrency is <strong>built in and simple to turn on.</strong></li></ul><p><strong>Config:</strong></p><pre>// playwright.config.ts<br>import { defineConfig } from &#39;@playwright/test&#39;;<br>export default defineConfig({<br>  workers: &#39;50%&#39;, // use half of available CPU cores<br>  fullyParallel: true, // allow tests to run in parallel<br>  reporter: [[&#39;html&#39;], [&#39;line&#39;]],<br>  use: { trace: &#39;on-first-retry&#39;, video: &#39;retain-on-failure&#39;, screenshot: &#39;only-on-failure&#39; }<br>});</pre><p><strong>CLI:</strong></p><pre>npx playwright test --workers=4</pre><h4><strong>WebdriverIO</strong></h4><ul><li>Scales via workers and integrates smoothly with <strong>cloud grids</strong>.</li><li>WDIO’s <strong>runner</strong> spawns one or more <strong>worker processes</strong> per spec/capability. You dial up concurrency with maxInstances (global or per capability) in the config file.</li><li>It’s flexible and plays well with <strong>cloud grids</strong> (BrowserStack, Sauce Labs) and enterprise <strong>Selenium Grid</strong> via services, but that also means a bit more configuration.</li><li>WDIO’s concurrency is <strong>highly configurable</strong> and excels when you’re orchestrating many remote sessions on cloud grids.</li></ul><pre>// wdio.conf.js<br>export const config = {<br>  maxInstances: 4, // number of parallel workers per capability<br>  services: [&#39;chromedriver&#39;], // or [&#39;sauce&#39;], [&#39;browserstack&#39;], [&#39;selenium-standalone&#39;]<br>  reporters: [&#39;spec&#39;],<br>  capabilities: [{<br>  browserName: &#39;chrome&#39;,<br>   &#39;goog:chromeOptions&#39;: { args: [&#39;--headless=new&#39;] }<br>  }]<br>};<br>// run: npx wdio run wdio.conf.js</pre><p>Before choosing based on DX alone, zoom out: your surrounding ecosystem, including your BDD workflow, cloud-grid alignment, and whether you need one runner for web and mobile, is often the deciding factor. The next section maps common scenarios to the tool that fits best.</p><h3>Ecosystem fit: when each shines</h3><h4>Choose <strong>Playwright</strong> if you want:</h4><ul><li>A <strong>single, integrated tool</strong> (runner, assertions, parallelization, trace viewer, codegen)</li><li>Fast, reliable <strong>cross‑browser</strong> (Chromium, Firefox, WebKit) with great debugging artefacts</li><li>A modern <strong>locator</strong> philosophy that minimizes explicit waits</li><li>A small‑to‑mid‑size <strong>web‑only</strong> project where speed and maintainability trump everything</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NmDb-SzjULRD3e0chYlTwA.png" /></figure><h4>Choose <strong>WebdriverIO</strong> if you need:</h4><ul><li>Strong <strong>BDD (Cucumber)</strong> support, or your team prefers feature files and step definitions</li><li><strong>Cloud grid</strong> and Selenium ecosystem alignment (BrowserStack/ Saucelabs / enterprise Selenium Grid)</li><li>A single runner across <strong>web + mobile</strong> (via <strong>Appium</strong>) and multi‑project setups</li><li>Deep customization via <strong>services</strong> (DevTools, ChromeDriver, image comparison, cloud integrations)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aQ2oRD-ZkM6cL-iolL4U_g.png" /></figure><h3>Conclusion / CTA</h3><p>There’s no universal winner. The better choice is the one that fits your first project’s constraints. If your immediate goal is to stand up a reliable web UI suite within a week with minimal decisions, start with <strong>Playwright</strong>. If your roadmap includes <strong>Cucumber</strong>, <strong>Appium</strong>, or deep <strong>cloud grid</strong> usage, consider <strong>WebdriverIO</strong> as your long-term anchor.</p><p>Happy Learning!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=512f428f7f86" width="1" height="1" alt=""><hr><p><a href="https://medium.com/emumba/playwright-vs-webdriverio-how-to-choose-the-right-framework-512f428f7f86">Playwright vs. WebdriverIO: How to Choose the Right Framework?</a> was originally published in <a href="https://medium.com/emumba">Emumba</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Generative AI in UI Testing: How QA Engineers Can Leverage AI for Better Efficiency]]></title>
            <link>https://medium.com/emumba/generative-ai-in-ui-testing-how-qa-engineers-can-leverage-ai-for-better-efficiency-006a41c2c4ee?source=rss-bc85ccec31d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/006a41c2c4ee</guid>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[qa]]></category>
            <category><![CDATA[tools]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Usman Ghani]]></dc:creator>
            <pubDate>Thu, 17 Apr 2025 08:17:30 GMT</pubDate>
            <atom:updated>2025-04-17T09:11:51.796Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>Some ways to leverage GenAI in UI testing to make it more effective</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*I3N-YjtUKZfL27Xd.png" /></figure><p>Imagine running hundreds of UI tests in minutes, catching visual bugs before they reach production, and reducing manual effort significantly. Sounds like a dream, right? With Generative AI (GenAI), this dream is fast becoming a reality for QA engineers.</p><p>According to a recent study by <strong>TestSigma</strong>, GenAI can boost productivity in software testing by <strong>30–40%</strong>, leading to significant cost savings for organizations.<a href="https://testsigma.com/blog/generative-ai-in-software-testing/"><em>[1]</em></a><em> </em>According to <strong>Campgemini’s </strong>research report, <strong>49%</strong> of respondents reported improved software quality with GenAI’s capabilities.<a href="https://tecknexus.com/generative-ai-to-drive-productivity-insights-from-ibm-and-capgemini-survey/8/"><em>[2]</em></a></p><p>With companies increasingly adopting AI, testers must understand how GenAI can revolutionize UI testing. Furthermore, before we discuss how we can use GenAI in UI testing, let&#39;s dissect what UI testing and GenAI are.</p><h4>UI Testing</h4><p><strong>UI testing</strong> evaluates an application’s visual and interactive elements to ensure they function correctly and deliver a seamless user experience. It involves verifying that buttons, menus, icons, and other interactive components respond appropriately to user actions. We will see later in the article how Gen AI jams with it to make it less hectic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FnisB4Yv0Wdjo_Q5" /></figure><h4>GenAI</h4><p><strong>Generative Artificial Intelligence (GenAI)</strong> refers to AI systems capable of creating new content — such as text, images, or even test scenarios — by learning from existing data. These models analyze patterns and structures within their training data to produce new, similar content based on user prompts.</p><h3>Understanding Generative AI in UI Testing</h3><p>Now that we know the terms, let&#39;s understand how to jam both. When applied to UI testing, GenAI can automate and enhance various testing processes, including</p><h4><strong>Visual Regression Testing</strong></h4><p>Traditional visual regression testing requires comparing UI snapshots manually or using baseline images. AI-powered tools like Applitools and Percy use deep learning to automatically detect UI discrepancies, making visual validation faster and more accurate. AI-powered tools can compare thousands of UI elements, highlighting visual bugs in seconds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/1*XJOrvfrQdLs61_ds1LEWZA.jpeg" /><figcaption>Visual Regression Testing <a href="https://www.lambdatest.com/learning-hub/visual-regression-testing">[3]</a></figcaption></figure><h4><strong>Automated Test Case Generation</strong></h4><p>Writing comprehensive UI test cases manually can be time-consuming. GenAI can analyze application context, user behaviour and past defects to suggest or auto-generate test cases, ensuring better test coverage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*s3opsjcUFuOnT86_.png" /><figcaption>Automated Test Case Generation <a href="https://sofy.ai/blog/automatic-test-case-generation-using-machine-learning/">[4]</a></figcaption></figure><h4><strong>Self-Healing Test Scripts</strong></h4><p>One of the biggest challenges in UI testing is maintaining flaky test scripts due to frequent UI changes. GenAI-powered test automation tools like Testim and Sofy can dynamically adjust locators when UI elements change, reducing test failures.</p><p>🛠 <strong>Example:</strong> An automation engineer running WebdriverIO tests notices frequent UI updates break test scripts. After running scripts, one will check the report to review all the test cases affected by the selector changes. It will consume a lot of time, and repeating this exercise will frustrate the engineer. By integrating AI-powered tools with self-healing capability, test scripts adapt to UI changes automatically, cutting maintenance time effectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*1oBZ_awDWDB67tPR.png" /><figcaption>Self Healing Automation Process <a href="https://www.stickyminds.com/article/continuous-testing-self-healing-why-it-important">[5]</a></figcaption></figure><h4><strong>AI-Driven Bug Detection</strong></h4><p>AI-driven bug detection leverages machine learning algorithms to identify potential issues in UI that might be missed during manual testing. These systems analyze patterns from historical defects and user interaction data to predict where new bugs might occur.</p><p>🛠 <strong>Example: </strong>An e-commerce platform could implement AI tools that automatically flag unusual UI behaviours when product pages load differently across devices or browsers. This proactive approach not only catches obvious visual discrepancies but also identifies subtle functional errors like button state inconsistencies or form validation problems before they impact users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MMMIjP-qf-Gi3fXr.jpg" /><figcaption>AI driven Bug Detection <a href="https://assistgpt.io/trending/automated-bug-detection-and-code-generation-with-generative-ai/">[6]</a></figcaption></figure><h4><strong>Accessibility Testing</strong></h4><p>AI is capable of identifying accessibility issues across an application. AI tools can quickly identify and suggest improvements, ensuring UI elements comply with accessibility standards, thus enhancing usability for all users.</p><p>🛠 <strong>Example:</strong> A healthcare website utilizes AI-powered accessibility tools to scan its interface, identifying critical issues such as missing alt-text on images, inadequate colour contrast, and improper form labels. Resolving these accessibility barriers enables the website to comply with WCAG standards while significantly improving usability for visitors with visual impairments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*e1J6GRU-eO-2oMp_" /></figure><h4><strong>Localization Testing</strong></h4><p>AI-driven localization testing can ensure the consistency of UI components across various languages and regions. AI-driven machine translation systems, like Google Translate and Microsoft Translator, enable rapid and efficient translation of content across multiple languages, helping us detect any anomalies. AI systems can be further trained to understand cultural preferences for more appropriate localization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-YQKEW9QeEA7PR1G" /><figcaption>AI Driven Localization Testing <a href="https://www.linkedin.com/pulse/localization-testing-ai-opal-technology-solutions-tr0zc/">[7]</a></figcaption></figure><h4><strong>A/B Testing</strong></h4><p>A/B testing compares different versions of a user interface to determine which design performs better with actual users. Leveraging AI, teams can generate multiple UI variations simultaneously and automatically assess user interactions with each version, revealing which design elements most effectively drive engagement and conversions.</p><p>AI algorithms can detect complex patterns within data, including those that might escape human observation. This deep analysis reveals underlying cause-and-effect relationships between variables, empowering more informed, data-driven decision-making. It can anticipate how changes in your campaigns will impact consumer behaviour and conversion rates.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3WwMHP_NGbhV-KrR.jpg" /><figcaption>AI Driven A/B Testing <a href="https://www.yourdigitalresource.com/post/ai-for-a-b-testing">[8]</a></figcaption></figure><h4>AI-Powered Exploratory Testing</h4><p>Exploratory testing is essential for finding unexpected bugs, but it requires skilled testers. AI can enhance this process by suggesting unpredictable user interactions and detecting UI glitches faster.</p><p>🛠 <strong>Example:</strong> The gaming industry can greatly benefit from AI-powered exploratory testing tools. A game typically consists of several characters and assets, each capable of diverse interactions. AI-driven tools can effectively simulate unpredictable user interactions, identifying potential glitches that might easily cause issues in the future.</p><h3>Challenges and Considerations</h3><p>Despite its advantages, integrating GenAI in UI testing comes with challenges:</p><ul><li><strong>False Positives:</strong> AI-based visual testing tools may flag minor pixel differences as issues.</li><li><strong>Learning Curve:</strong> Teams must upskill to leverage AI-powered testing effectively.</li><li><strong>Cost:</strong> Some AI-driven testing solutions can be expensive for startups.</li></ul><h3>The Verdict: GenAI, a Game Changer in UI Testing</h3><p>The role of QA is evolving, and GenAI is at the forefront of this transformation. GenAI enables QA engineers to focus on strategic testing rather than repetitive work by automating tedious tasks, improving test accuracy, and predicting defects.</p><p>Companies like <strong>Microsoft</strong> and <strong>Google </strong>have seen significant efficiency gains — cutting test creation time by <strong>70%</strong> and reducing testing cycles by <strong>60%</strong>, respectively. <a href="https://www.testingtools.ai/blog/ai-test-agents-bridging-the-gap-between-speed-and-quality-in-devops/"><em>[9]</em></a> Embracing Generative AI is not just an option — it’s a necessity for staying competitive in today’s fast-paced development landscape.</p><p>So, if you’re a QA professional, now is the perfect time to explore how GenAI can take your UI testing to the next level.</p><p>[1] <a href="https://testsigma.com/blog/generative-ai-in-software-testing/">https://testsigma.com/blog/generative-ai-in-software-testing/</a></p><p>[2] <a href="https://tecknexus.com/generative-ai-to-drive-productivity-insights-from-ibm-and-capgemini-survey/8/">https://tecknexus.com/generative-ai-to-drive-productivity-insights-from-ibm-and-capgemini-survey/8/</a></p><p>[3] <a href="https://www.lambdatest.com/learning-hub/visual-regression-testing">https://www.lambdatest.com/learning-hub/visual-regression-testing</a></p><p>[4] <a href="https://sofy.ai/blog/automatic-test-case-generation-using-machine-learning/">https://sofy.ai/blog/automatic-test-case-generation-using-machine-learning/</a></p><p>[5] <a href="https://www.stickyminds.com/article/continuous-testing-self-healing-why-it-important">https://www.stickyminds.com/article/continuous-testing-self-healing-why-it-important</a></p><p>[6] <a href="https://assistgpt.io/trending/automated-bug-detection-and-code-generation-with-generative-ai/">https://assistgpt.io/trending/automated-bug-detection-and-code-generation-with-generative-ai/</a></p><p>[7] <a href="https://www.linkedin.com/pulse/localization-testing-ai-opal-technology-solutions-tr0zc/">https://www.linkedin.com/pulse/localization-testing-ai-opal-technology-solutions-tr0zc/</a></p><p>[8] <a href="https://www.yourdigitalresource.com/post/ai-for-a-b-testing">https://www.yourdigitalresource.com/post/ai-for-a-b-testing</a></p><p>[9] <a href="https://www.testingtools.ai/blog/ai-test-agents-bridging-the-gap-between-speed-and-quality-in-devops/">https://www.testingtools.ai/blog/ai-test-agents-bridging-the-gap-between-speed-and-quality-in-devops/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=006a41c2c4ee" width="1" height="1" alt=""><hr><p><a href="https://medium.com/emumba/generative-ai-in-ui-testing-how-qa-engineers-can-leverage-ai-for-better-efficiency-006a41c2c4ee">Generative AI in UI Testing: How QA Engineers Can Leverage AI for Better Efficiency</a> was originally published in <a href="https://medium.com/emumba">Emumba</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Role of QA in Customer Success]]></title>
            <link>https://medium.com/emumba/role-of-qa-in-customer-success-dbc759fe7231?source=rss-bc85ccec31d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/dbc759fe7231</guid>
            <category><![CDATA[business]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[user-experience]]></category>
            <category><![CDATA[qa]]></category>
            <category><![CDATA[customer-experience]]></category>
            <dc:creator><![CDATA[Usman Ghani]]></dc:creator>
            <pubDate>Thu, 14 Nov 2024 09:06:05 GMT</pubDate>
            <atom:updated>2024-11-14T09:06:05.713Z</atom:updated>
            <content:encoded><![CDATA[<p>What is CX testing, how to perform it and what are its benefits?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/0*JtmB7UMn60bR1bqE" /></figure><p>What if I tell you that 74% of consumers are at least somewhat likely to buy based on experience alone¹? Sounds intriguing… Yes, it is.</p><p>To capitalize on this insight, businesses are focused on delivering outstanding customer experiences. This is where Customer experience(CX) testing comes into play. In this blog, we will discuss what is CX testing and how QAs can help improve the overall customer experience.</p><h3>What is Customer Experience Testing?</h3><p>CX testing is a process in which a QA evaluates how users interact with a product or service. It involves assessing the usability and accessibility of the application. The goal is to gather insights into customer behaviour, preferences, and pain points, allowing businesses to make informed improvements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*CBKQwTlzeNghVJSa" /></figure><h3>Benefits of Customer Experience Testing</h3><p>Customer experience plays a vital role in the success of business. Great user experience empowers enterprises to transform customers into enthusiastic brand ambassadors. These ambassadors serve as an invaluable channel for word-of-mouth marketing, effectively promoting their bands. To further understand its importance, let’s look into some of the stats below:</p><ul><li><strong>Increased Customer Satisfaction:</strong> Satisfied customers are likelier to return and recommend the brand. According to<a href="https://emplifi.io/press/86-percent-consumers-will-leave-brand-after-two-poor-experiences"> Emplifi</a>, <strong><em>86% of customers</em></strong> would leave a brand after as few as 2 poor experiences.</li><li><strong>Identify Weak Points:</strong> businesses can enhance satisfaction levels. Customers are<a href="https://www.forrester.com/blogs/whats-the-roi-of-cx-transformation/"> 2.4 times more likely</a> to stick with a brand when their problems are solved quickly</li><li><strong>Higher Retention Rates: </strong>Companies that prioritize customer experience see a <strong><em>42% increase in customer retention</em>,</strong> a <strong><em>33% improvement in customer satisfaction</em>,</strong> and a <strong><em>32% increase in cross-selling and upselling</em>,</strong> according to<a href="https://keap.com/business-success-blog/customer-service/customer-experience/improving-customer-experience"> Keap</a>.</li><li><strong>Competitive Advantage: </strong>In today’s market, excellent customer experience can differentiate a brand from its competitors. Businesses that excel in CX often report higher profitability.<a href="https://www.bain.com/insights/are-you-experienced-infographic/"> Bain &amp; Company</a> found that companies that succeed at customer experience increase their sales by <strong><em>4–8% higher than the market average</em></strong>.</li></ul><h3>Methods of CX Testing</h3><p><a href="https://www.twilio.com/blog/announcing-the-state-of-personalization-2021">85%</a> of businesses believe they are offering a great customer experience, but only 60% of consumers agree. If there is a gap between a product and a consumer, QA can play a very important role in diagnosing these issues. Below, we will look down at some of the methods for CX testing that QA can perform.</p><ul><li><strong>Usability Testing:</strong> This involves observing users as they interact with your product to identify any usability issues or pain points. In Usability testing, a QA works as a facilitator. QA asks the real user to perform tasks they will perform in real-world scenarios. While the participant completes each task, the QA observes the participant’s behaviour and listens for feedback.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*Ay5ECZeqKgU3sX0E" /></figure><ul><li><strong>A/B Testing:</strong> It is a method to compare two versions of a variable (Version A and Version B) and expose them to different segments of users simultaneously. The performance of each version is then measured against predetermined success metrics, such as conversion rates or user engagement levels.<br>For example, I was testing an OTT-based application. In that application, one flow was to log in/Sign up using the watch list button on the home page. When we tested it out, we observed that once the modals open we have to click another button and then the page appears to select an IDP to login/sign up. We observed it may not provide an optimal user experience for our customers.<br>The team created another variation in which when we clicked the watch list button on the home page, it would directly open the modal with all the available IDPs on the same page. We rolled out both variations amongst our customers, and the customers for which the <em>variation</em> appeared rated the experience <em>high</em>. The ones, for which the <em>control</em> version appeared, rated the experience <em>low</em>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*L4yDTDLT3Dy_7RzM" /><figcaption>Fig: Control (Orginal Version) &amp; Variation (Modified Version)</figcaption></figure><ul><li><strong>Satisfaction Surveys:</strong> These surveys gather feedback directly from customers about their overall satisfaction with your product or service.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/0*8zx9tvTW9bOpxCf9" /><figcaption><a href="https://mopinion.com/customer-experience-survey/">Source</a></figcaption></figure><ul><li><strong>Customer Journey Mapping:</strong> This is a visual tool that outlines the stages a customer goes through when interacting with a business, from initial awareness to post-purchase engagement. It captures every touchpoint such as social media interactions, website visits, and customer service encounters.</li><li><strong>Phases</strong>: A phase is simply a stage of decision-making and purchasing the customer is in. Mentioned below is a basic outline:</li><li><strong>Awareness:</strong> The customer identifies a need, problem, or opportunity.</li><li><strong>Research:</strong> They explore solutions to whether to purchase and assess options.</li><li><strong>Consideration:</strong> They choose to buy to address their need and narrow their options.</li><li><strong>Purchase:</strong> They purchase the solution.</li><li><strong>Support:</strong> They use it, engage with customer service, and then decide whether to become their ambassador or not.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*gNhsFR2ErJbEs5Iu" /><figcaption>Source:<a href="https://www.forbes.com/advisor/business/software/customer-journey-map/"> Forbes Advisor</a></figcaption></figure><h3>How to Conduct Effective CX Testing</h3><p>Customer Experience testing is a part of the QA domain. Every QA, either manual or automated, plays a part in improving the user experience of the application. They both test the functional and non-functional requirements of the application. They make sure that applications are usable, efficient, reliable, and stable to use for the end users. They should keep these steps in mind when incorporating customer experience testing into their existing process.</p><h4>Test Planning</h4><p>A test plan is a document that outlines the strategy, objectives resources, and schedule for software testing. It serves as a roadmap for the testing process, detailing what will be tested and how will it be tested. Usability and accessibility must be added too in the plan to make sure that QA develops test cases related to it.</p><h4>Teaming with Customer Success Team</h4><p>Customer success teams ensure that customers achieve their desired outcomes with a company’s products and services. They facilitate onboarding, build strong relationships, proactively address customer needs, and gather feedback to enhance satisfaction and retention.</p><p>The customer success team should participate in this meeting to foster collaboration with the QA team, it should be the role of the QA team to make sure they are an integral part of test planning. They possess valuable data that the QA team needs to create effective test cases.</p><h4>Analyze Customer Feedback</h4><p>When the customer success team collects data, the QA team should analyze it to identify the most frequently reported issues. It’s important to establish clear criteria between both teams to ensure that only feedback likely to yield significant benefits is acted upon.</p><p>When visualizing data, it’s crucial to approach feedback with discernment. Not every suggestion will enhance the user experience; implementing changes based solely on input from a few individuals can introduce bias. A careful evaluation of feedback ensures that the final visualization remains clear and effective for a broader audience.</p><h4>Implement Feedback</h4><p>Once the effective feedback is selected, discuss those points in the sprint retrospective and make sure those points are part of the next sprint. Make sure customer feedback is getting implemented and taken seriously.</p><h3>Conclusion</h3><p>CX testing is an essential part of the product development process. This opens a new era for QAs who were performing functional and non-functional testing to perform CX testing on the frontline. QA should be a hybrid role where one not only tests the application but interacts with customers as well to develop a business sense as well.</p><p>Happy Learning!</p><p>[1]: Forbes &amp; Arm Treasure Data,<a href="https://www.treasuredata.com/resources/"> https://www.treasuredata.com/resources/</a></p><p>[2]: Quantum metric,<a href="https://www.quantummetric.com/heatmaps"> https://www.quantummetric.com/heatmaps</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dbc759fe7231" width="1" height="1" alt=""><hr><p><a href="https://medium.com/emumba/role-of-qa-in-customer-success-dbc759fe7231">Role of QA in Customer Success</a> was originally published in <a href="https://medium.com/emumba">Emumba</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[E2E Integration of Cypress with Cucumber]]></title>
            <link>https://medium.com/emumba/e2e-integration-of-cypress-with-cucumber-f4a50bc40503?source=rss-bc85ccec31d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/f4a50bc40503</guid>
            <category><![CDATA[cypress]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[qa]]></category>
            <category><![CDATA[cucumber]]></category>
            <dc:creator><![CDATA[Usman Ghani]]></dc:creator>
            <pubDate>Tue, 20 Feb 2024 12:26:58 GMT</pubDate>
            <atom:updated>2024-02-20T12:26:58.046Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*1cm3_k9mo2WaU-mp.jpg" /></figure><h4>E2E Steps to Configure Cucumber with Cypress</h4><h3>Introduction</h3><p>Cypress is an automation framework that supports browser interaction. Cucumber is a Gherkin-based test case management tool that can be used with automation frameworks such as Cypress. It helps in writing test cases that make sense to all the stakeholders ( technical and non-technical). For reporting, Mochawesome is quite a hot and famous reporter for Cypress. For soft assertions, a plugin can be installed as Cypress only supports hard assertions i.e. should/expect (Chai Assertions).</p><p>Now I will guide you regarding the steps to integrate Cucumber with Cypress.</p><h3>Dependencies Installation</h3><p>You need to install the following dependencies first using npm/yarn:</p><ol><li>Cypress</li><li>@badeball/cypress-cucumber-preprocessor</li><li>@bahmutov/cypress-esbuild-preprocessor</li><li>cypress-mochawesome-reporter</li><li>soft-assert</li><li>Chai assertions (already gets installed with Cypress)</li><li>cypress-dotenv</li><li>cypress-cucumber-attach-screenshots-to-failed-steps</li></ol><h3>Configure Cucumber</h3><p>In Cypress v12, a file named, cypress. config.js is automatically created in the root directory of the project. This file is mainly used for the configuration of plugins.</p><p>To configure cucumber you need to add these lines of code in the configuration file.</p><pre>const { defineConfig } = require(&#39;cypress&#39;);<br>// import esbuild plugin<br>const {<br>  createEsbuildPlugin,<br>} = require(&#39;./node_modules/@badeball/cypress-cucumber-preprocessor/<br>dist/subpath-entrypoints/esbuild&#39;);<br>// import cucumber plugin<br>const {<br>  addCucumberPreprocessorPlugin,<br>} = require(&#39;@badeball/cypress-cucumber-preprocessor&#39;);<br>// Create Bundler<br>const createBundler = require(&#39;@bahmutov/cypress-esbuild-preprocessor&#39;);<br><br>module.exports = defineConfig({<br>  chromeWebSecurity: false,<br>  experimentalWebKitSupport: true,<br>  screenshotsFolder: &#39;cypress/screenshots&#39;,<br>  videosFolder: &#39;cypress/reports/videos&#39;,<br>  video: true,<br>  viewportWidth: 1280, // depend upon your requirement<br>  viewportHeight: 1000, // depend upon your requirement<br>  defaultCommandTimeout: 90000, <br>  execTimeout: 90000,<br>  pageLoadTimeout: 90000,<br>  taskTimeout: 90000,<br>  e2e: {<br>    specPattern: `cypress/integration/e2e/features/**/*.feature`,<br>    setupNodeEvents(on, config) {<br>      // add cucumber preprocessor in the events<br>      addCucumberPreprocessorPlugin(on, config);<br>      on(<br>        &#39;file:preprocessor&#39;,<br>        createBundler({<br>          plugins: [createEsbuildPlugin(config)],<br>        })<br>      );<br>    },<br>  },<br>});</pre><p>In the above snippet, only the feature file path is defined, the step definitions path needs to be defined as well. For this, add the following lines of code in “package.json”:</p><pre>&quot;cypress-cucumber-preprocessor&quot;: {<br>    &quot;nonGlobalStepDefinitions&quot;: false,<br>    &quot;stepDefinitions&quot;: [<br>      &quot;cypress/integration/e2e/stepDefinitions/[filepath]/**/*.steps.js&quot;,<br>      &quot;cypress/integration/e2e/stepDefinitions/**&quot;<br>    ]<br>  }</pre><p>In the “stepDefinitions” array two paths are defined:</p><ol><li>The first one is required for single-file execution</li><li>The second one is required for all file execution</li></ol><p>After that, step names can be imported into the step file like this</p><pre>const {<br>  Given,<br>  When,<br>  Then<br>} = require(`@badeball/cypress-cucumber-preprocessor`);</pre><h3>Reporting</h3><p>Reporting organizes the results of your test execution which makes it easier for a tester to view or debug errors(in case of failures). That’s why requirements must be discussed with the team before configuring the reporter. Cypress Mochawesome Reporter is taken as an example for this blog.</p><p>The reporter options are configured in “cypress.config.js”. These lines of code will help you configure the reporter.</p><pre>const { defineConfig } = require(&#39;cypress&#39;);<br><br>module.exports = defineConfig({<br>  reporter: &#39;cypress-mochawesome-reporter&#39;,<br>  reporterOptions: {<br>     reportDir: &#39;cypress/reports&#39;,<br>     charts: true,<br>     html: true,<br>     json: false,<br>     embeddedScreenshots: true,<br>     inlineAssets: true,<br>  },<br>  e2e: {<br>    setupNodeEvents(on, config) {<br>       // Use the reporter plugin here<br>       require(&#39;cypress-mochawesome-reporter/plugin&#39;)(on);<br>    },<br>  },<br>});</pre><p>Then register the reporter in support/commands.js using the following syntax:</p><pre>require(&#39;cypress-mochawesome-reporter/register&#39;);</pre><h3>Dynamic Execution</h3><p>Execution of the test suite is critical as we want to keep our command as dynamic, easy to use, and short as we can. For this, you can set up a JSON file to store the file path against a keyword to make the command compact and easy to handle.</p><p>For example, create a “flowPath.json” file in the fixture folder of Cypress.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UdZT18Gzlp1oS4kgIunqCg.png" /><figcaption>flowPath.json</figcaption></figure><p>This file can act as a source map for the dynamic execution of flows. These lines of code need to be added in “cypress.config.json”.</p><pre>const { defineConfig } = require(&#39;cypress&#39;);<br>// Environment Plugin to be imported<br>const dotenvPlugin = require(&#39;cypress-dotenv&#39;);<br>// Created Flow path json file to be imported<br>const flowPaths = require(&#39;./cypress/fixtures/flowPaths.json&#39;);<br><br>module.exports = defineConfig({<br>  e2e: {<br>    setupNodeEvents(on, config) {<br>       // You need to paste these lines of code <br>       // in already configured cypress.config.json<br>       config.specPattern = `cypress/integration/e2e/features/${<br>        flowPaths[config.env.flowName]<br>       }.feature`;<br>       config = dotenvPlugin(config);<br>       return config;<br>    },<br>  },<br>});</pre><p>We have used an environment variable, “flowName”, in the configuration file to provide the feature or spec file name. To read an environment variable in the configuration file a plugin is used, “dotenvPlugin”.</p><p>Environment variables are easy to use in the step files compared to the configuration file. Test cases need to be executed across different test environments such as QA, UAT, or Prod. We can use environment variables inside the step file to hit that particular URL. For example,</p><pre>let testEnv = Cypress.env(&#39;testEnv&#39;);</pre><p>In the next section, you will learn to execute commands involving environment variables.</p><h3>Execution Command</h3><p>To execute your suite you can use the following commands:</p><ol><li>Single File Execution</li></ol><pre>npx cypress run --env testEnv=UAT,flowName=authenticationFlow</pre><p>2. All Files Execution</p><pre>npx cypress run --env testEnv=PROD,flowName=allFlows</pre><p><strong>Note: </strong>The flow name environment variable value is set based on the key value pair used in “flowPaths.json”. For “testEnv” you can set up another JSON file as per your requirement.</p><h3>CRUX</h3><p>The advantage of the above cucumber plugin is that you can use data tables in it easily. DataTables not only optimize the code coverage but also reduce the execution time of the scenario by a few seconds. These steps can help you configure Cypress with Cucumber easily. In case of any queries follow me on <a href="https://www.linkedin.com/in/usmanghani786/">LinkedIn</a> or <a href="https://www.instagram.com/usman_ghani18/">Instagram</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/0*8-DnT7EArrtyJCQm.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f4a50bc40503" width="1" height="1" alt=""><hr><p><a href="https://medium.com/emumba/e2e-integration-of-cypress-with-cucumber-f4a50bc40503">E2E Integration of Cypress with Cucumber</a> was originally published in <a href="https://medium.com/emumba">Emumba</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to resolve the Socket hang-up issues in webdriverIO]]></title>
            <link>https://medium.com/emumba/how-to-resolve-the-socket-hang-up-in-webdriverio-80cda1a33cca?source=rss-bc85ccec31d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/80cda1a33cca</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[webdriver]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[sauce-labs]]></category>
            <category><![CDATA[qa]]></category>
            <dc:creator><![CDATA[Usman Ghani]]></dc:creator>
            <pubDate>Wed, 22 Mar 2023 10:05:35 GMT</pubDate>
            <atom:updated>2023-03-22T10:48:46.281Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FZ6jtvcjlpFqrnva.jpg" /></figure><h4>Some hacks to avoid socket hang-up issues when using Sauce labs with webdriverIO</h4><p>In automation, what we often ignore as QA Automation Engineers is time complexity. Even for a simple task, we will try to develop a complex logic and although it will work individually when we run the test in parallel it will throw random errors. The <strong><em>socket hang-up</em></strong> issue is one of those issues.</p><h3>Why does the socket hang-up issue occur?</h3><p>It occurs either when a client sends a request to a distant server but the response is not received in a timely manner or when you start a new command even though the previous command was not executed completely. In webdriverIO and sauce labs, there could be two reasons for the issue: code complexity or the sauce lab tunnel not being in the same region as the application under testing. Code complexity arises from excessive database queries or inefficient code.</p><blockquote>Debugging is twice as hard as writing the code in the first place.</blockquote><blockquote><a href="https://www.azquotes.com/author/38835-Brian_Kernighan"><strong>Brian Kernighan</strong></a></blockquote><p>As mentioned earlier when we developed the logic and tested our scenarios no errors appeared. The problem started when multiple feature files were getting executed in parallel on sauce labs. At the first sight, we were baffled because not only were we unaware of the root cause of the problem but also there was no support on the online platforms.</p><p>After skimming hundreds of articles, one idea struck my subconscious mind which was to sneak through our tasks, assertions and action files. We have followed the page object model in our test automation suite, thus functions are reusable. There I realized that calling the same function at numerous places caused excessive DB calls and use of maps which is causing the issue.</p><p>The first thing that came to my mind was (just kidding)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*4zdDBFoJbF23UXTc" /></figure><p>We finally got to the starting point of our debugging cycle. I went through different feature files, and functions, reduced time complexity and many things to successfully remove the socket hang-up issue from the code base.</p><p>In the below section, I will discuss all the hacks which I tried to resolve the socket hang-up issue.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/0*sa0489Dz5KcLkIi1" /></figure><h3>Possible Solutions</h3><p>These solutions are not only related to code or time complexity but also sauce lab tunnel. We will be deeply looking into these solutions.</p><h4>Sauce labs Tunnel</h4><p>It is a good practice to ensure that the sauce lab tunnel must be in the same region as the application under test. Moreover, that tunnel should be specifically designated to the automation team. The former part is to avoid latency between the calls from the client to the server and the latter part is to avoid unwanted traffic.</p><p>To set up a tunnel on a temporary basis, you will have to follow these steps:</p><ol><li>Download <strong><em>Sauce Connect Proxy</em></strong> from<strong><em> </em></strong><a href="https://docs.saucelabs.com/secure-connections/sauce-connect/installation/#:~:text=Downloading%20Sauce%20Connect%20Proxy%E2%80%8B,below%20corresponding%20to%20your%20OS.&amp;text=Extract%20the%20contents%20of%20the,folder%20to%20your%20home%20directory."><strong><em>here</em></strong></a>.</li><li>Extract the downloaded folder and then open the bin folder in it</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/328/1*uZMF9qUGZZRlPhmz9N6Fig.png" /><figcaption>Sauce Connect Poxy bin folder</figcaption></figure><p>3. Open cmd in the folder</p><p>4. Type this command in the cmd prompt for:</p><p>i) Non-shared tunnel</p><pre>sc -u &lt;sauceLabUsername&gt; -k &lt;sauceLabKey&gt; --region &lt;region&gt; --tunnel-identifier &lt;tunnelName&gt; --no-remove-colliding-tunnels</pre><p>ii) Shared Tunnel</p><pre>sc -u &lt;sauceLabUsername&gt; -k &lt;sauceLabKey&gt; --region &lt;region&gt; --tunnel-identifier &lt;tunnelName&gt; --no-remove-colliding-tunnels --shared-tunnel</pre><p><strong>Note:</strong> Once you close the terminal or quit the command the tunnel will get terminated automatically.</p><h4>Optimize Usage of Timeouts and Interval</h4><p>Setting timeouts in the webdriverIO configuration file can be very effective. Those timeouts work globally in the code base where you use <strong>“wait for”</strong> commands. To wait for a UI element to appear particularly after a time, you can overwrite the timeout value for that element. One of the good practices would be to create a waits.json file like below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/427/1*WjYPYW1Irx_r8Jnq4a9pcA.png" /><figcaption>waits.json</figcaption></figure><p>Don’t use an excessive amount of waits as it will increase your test suite execution time. If there are new changes in the environment i.e selector changes so it will take a lot of time to throw an error and may result in a socket hang-up issue.</p><p>When you use <strong><em>waitForDisplayed, waitForEnabled</em></strong> and <strong><em>waitForExist</em></strong> commands for dynamic waits there is a parameter named <strong>interval</strong> whose default value is <strong>500 ms</strong>. For example,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*QZbNrx62N5wf0BhLUVzfFw.png" /><figcaption>Interval</figcaption></figure><p>This interval will send a post-call to the server to check for the element state after 500 ms. This will increase the number of commands per flow resulting in socket hang-up issues.</p><p>You can set <strong><em>waitForInterval</em></strong> to <strong><em>15ms — 20ms</em></strong> in the webdriverIO configuration file below <strong>waitForTimeout</strong> like this:</p><pre>waitForTimeout: maxTimeout,<br>waitForInterval: intermediateWait,</pre><h4>Optimized Use of Maps</h4><p>In webdriverIO, there are maps that can be used to extract <strong><em>text</em></strong>, <strong><em>HTML</em></strong> and <strong><em>attributes</em></strong> of a list of elements using these commands:</p><p>i) Get text:</p><pre>await $$(selector).map((ele)=&gt;{ele.getText()})</pre><p>ii) Get HTML:</p><pre>await $$(selector).map((ele)=&gt;{ele.getHTML(false)})</pre><p>ii) Get Attribute:</p><pre>await $$(selector).map((ele)=&gt;{ele.getAttribute(attr)})</pre><p>Maps are generally used to find a certain element within an array. For example, if you want to verify if a specific episode title is present within a carousel of episode titles. The first thing that can come to your mind is using maps, but it is not a good approach.</p><p>What can come in handy in this case is either <strong><em>isExisting() </em></strong><em>or </em><strong><em>isDisplayed()</em></strong>. You can make a dynamic or parameterized selector and use the above-mentioned commands on it. For example,</p><pre>let existenceState: boolean = await $(`selectorFunction(selectorName)`).isExisting();<br>let displayState: boolean = await $(`selectorFunction(selectorName)`).isDisplayed();</pre><h4>Optimized DB Usage</h4><p>If your test automation suite involves DB assertions, you need to minimize the number of DB calls.</p><p>For example, you have a query to get the data of an event and then you use the data from that query for multiple verifications. Don’t use that query in every assertion function as it will be an ineffective technique. Just introduce a global variable on top of your step definition file and store the data from the query in it. Later use that variable at multiple places where you want to verify the Db entry on UI.</p><h4>Appropriate Number of Instances</h4><p>In webdriverIO, the number of instances that can be opened at a time can be set in the configuration file. Use a manageable number, good practice is to set a number between <strong><em>3, 4 and 5</em></strong>.</p><h4>Appropriate Number of Refresh</h4><p>Waiting for some data to update on the UI we can use the WebdriverIO <strong><em>refresh</em></strong> command:</p><pre>await browser.refresh();<br>await browser.refresh();<br>await browser.refresh();<br>await browser.refresh();<br>await browser.refresh();</pre><p>Calling too many refresh commands can result in socket hang-up issues too as there will be many incomplete commands causing latency in the response. Refresh can come in very handy but over-utilizing it might not be a good practice. What you can do is:</p><pre>await browser.refresh()<br>await browser.pause(intermediateWait) // 10000<br>await browser.refresh()<br>await browser.pause(intermediateWait) // 10000<br>await browser.refresh()<br>await browser.pause(intermediateWait) // 10000</pre><p>The above snippet will not only refresh the page but will also wait for the page to get stable thus no latency or incomplete response.</p><h4>Crux</h4><p>Time complexity plays an important role in coding. You must keep in mind that coding is not just integrating chunks of code, it&#39;s storytelling. Every variable is a character and each feature is a chapter including many scenarios. In case of any query or suggestion, feel free to reach out to me via <a href="/service/mailto:usman.ghani@emumba.com">Email</a> or <a href="https://www.linkedin.com/in/usmanghani786/">LinkedIn</a>, or <a href="https://www.instagram.com/usman_ghani18/">Instagram</a>.</p><p>Happy Coding!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*dqZnIuMa4017SmjG" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=80cda1a33cca" width="1" height="1" alt=""><hr><p><a href="https://medium.com/emumba/how-to-resolve-the-socket-hang-up-in-webdriverio-80cda1a33cca">How to resolve the Socket hang-up issues in webdriverIO</a> was originally published in <a href="https://medium.com/emumba">Emumba</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[THINK PROFESSIONALLY]]></title>
            <link>https://medium.com/@syed.usman.ghani/think-professionally-d03201950388?source=rss-bc85ccec31d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/d03201950388</guid>
            <category><![CDATA[decision-making]]></category>
            <category><![CDATA[emumba]]></category>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[professional]]></category>
            <category><![CDATA[self-improvement]]></category>
            <dc:creator><![CDATA[Usman Ghani]]></dc:creator>
            <pubDate>Tue, 10 Jan 2023 14:54:44 GMT</pubDate>
            <atom:updated>2023-01-10T14:54:44.888Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/716/0*4ruD_1YeI8uPMalU.jpg" /><figcaption>Unorthodox Thinking</figcaption></figure><h4>Some tips to make your professional life effective</h4><p>The everyday life of a professional is not as relaxed as compared to that of a child. Unlike a child, a professional is constantly occupied with tasks and responsibilities. These tasks can be related to managing people, solving technical problems, or resolving conflicts. One has to perform these tasks not only for the sake of completion but also to add value to oneself, the company one works for or the start-up they are associated with. Template-based decisions can lead you nowhere, you should now try to:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F3ySTE2pJko2i5dUZRx%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F3ySTE2pJko2i5dUZRx%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F3ySTE2pJko2i5dUZRx%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="561" frameborder="0" scrolling="no"><a href="https://medium.com/media/49e378ffff446b3ebbdf77cac7a4bd46/href">https://medium.com/media/49e378ffff446b3ebbdf77cac7a4bd46/href</a></iframe><p>Time is changing, and so should you. You have to observe and visualize what is better for your professional growth. A growth-centric mindset can help you become more productive and effective in your professional life.</p><p><strong><em>“Nothing is impossible. The word itself says ‘I’m possible!’”</em></strong></p><p><strong><em>- Audrey Hepburn</em></strong></p><p>Here are some points that can help you think professionally.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F29Ks7V9ybG45yGFJnQ%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F29Ks7V9ybG45yGFJnQ%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F29Ks7V9ybG45yGFJnQ%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/c69440a09453a009ae69a36662371a9c/href">https://medium.com/media/c69440a09453a009ae69a36662371a9c/href</a></iframe><h3><strong>Along with failures, learn from successes as well</strong></h3><p>You frequently hear that you must learn from your failures. This seems to convey the message that <strong>“you have to fail to learn anything or you will learn nothing at all!”</strong>. In reality, this is hardly the case, as one can learn from their successes as well…</p><p>Experimentation is a part of life, both professionally and personally. You keep experimenting with something to get desired results. It’s not a compulsion that someone will get to the right method by trying something for the first time. Neither is it a compulsion that they will learn something from their first success. You try multiple ways until you find one and you stop. You do not realize it but this is the time to learn from your success.</p><p>Learning from success means that you should further evaluate the right method to make your solution more effective. Later if you face a problem that is an integration of the previous one, you shouldn’t start from scratch. You’ve already got the right method from previous success and that will work again, just add another block to this foundation.</p><p>For example, you developed a mobile application for your client which kills unwanted applications. That project became a huge success and your client asked you to design another application that removes viruses from a mobile. The first question that should arise might be, “why a new application?” “Why not add this as a feature to the previous one?” You already have a foundation, you just have to add another block.</p><h3><strong>Prioritize tasks efficiently</strong></h3><p>Every task assigned to you does not have the same priority. It is implicitly your responsibility to prioritize your tasks. Each task assigned to you will not add the same amount of value to the product and some might not add any at all.</p><p>You should have a clear visualization as to which of your tasks will add more value to your product and which won’t. You should think before making any decisions. You can make a flow chart or a diagram for the visual representation of the task adding value to the product. The task which seems more important must be done at p0(highest priority).</p><p>Estimates are really important for a task, they give you a clear picture of when you would be able to present your work to your assignees. Never prioritize your tasks on the basis of estimations as you can end up doing those tasks which are of less priority.</p><p>If you don’t prioritize your tasks, you will end up being stuck all day and your productivity will be affected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*15snGConERxQnVus" /></figure><h3><strong>Keep Looking for Inspiration</strong></h3><p>Has this ever happened to you? You see a motivational video and you decide that from now on you will change. You make a schedule, start exercising and eat healthy food. You followed this routine for two weeks straight and then returned to your previous life. So why do you think this happens? Did you lose the value of the goal or something else? The value of the goal has remained intact. It is you who lost the inspiration or motivation to do that thing.</p><p>Inspiration is not a “one-time subscription” thing, hoping that the one inspirational video you saw once will work for a lifetime is not a practical approach. It doesn’t work like that. It is more of a weekly, monthly or daily subscription depending on you and your goal. You have to keep yourself inspired.</p><p>Just as you need fuel to drive a vehicle, you need to refill yourself with inspiration to be more productive and effective, else you will lose the race of productivity and efficiency.</p><p>So the next time you feel dull, bored or something similar, instead of going for coffee, first read or watch something inspirational. Don’t turn your life into a monotonous and boring schedule that you have to follow, rather inspire yourself to do new things and pursue new interests.</p><p><strong>Find Inspiration!!!!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*uc_4g-2D3KLbYkGk" /></figure><h3><strong>Culture is what you practice</strong></h3><p>Companies often brag a lot about their culture but the real question is, “what is culture”? Culture is anything that you practice frequently. So a company’s culture would be those practices that are being followed by the employees and their bosses.</p><p>For example, if a company brags that its culture is based on trust and honesty that means that every employee working there is completely transparent and aware of his or her responsibilities, and they all work well together.</p><p>If a company brags about having a diverse culture but in reality, their employees are being bullied for their ethnicities or their religion then diversity is definitely not that company’s culture, it’s a PR stunt.</p><p>People are the ones who create a culture, juniors follow the suit of their seniors. So what seniors practice, juniors imitate. If they find their seniors lying and mistreating their fellow employees they will do the same and hence a culture of dishonesty and manipulation would prevail. Basically,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*bcymBFfTU0DKU1ax" /></figure><h3><strong>Believe in suggestions, not orders</strong></h3><p>Sometimes the word <strong>“leader”</strong> is confused with a person giving orders. Leadership is not about giving orders, leaders work with their people for their improvement. They sit along with their people and ask for suggestions. Then they opt for the best option and work with them to see it through, not just marshal them around.</p><p>For example, to resolve a conflict between two employees a leader would sit with them and listen to their points of view. You cannot just give an order to “discuss your issues amongst yourselves and come up with a solution”. If the disputing parties are allowed to decide by themselves then the dominating one will most likely win that argument and if he or she has the wrong or vague solution then this can be harmful to the company.</p><p>Feedback loops help a lot in improving professionally and personally. Retrospective sessions can really help you improve your product or yourself. Everyone can give their input about the things that went great, any practice they did not follow or any other improvements related to the practices followed. Everyone gets a chance to learn and improve themselves professionally.</p><p>Asking for suggestions will lead to a better pool of solutions and improve the relationship between the manager and his or her employees. Employees will feel that they are important to the company and that in turn will make them more productive.</p><p>Asking for suggestions is a brave choice and is much better than being stuck on a problem you are unable to solve.</p><h3><strong>Listen to valuable criticism</strong></h3><p>Criticism is of two types: destructive and constructive. Destructive criticism is just to hurt and harm the other person by passing irrelevant statements. Constructive criticism, on the other hand, is about pointing out the mistakes and meaning well for others.</p><p>Pointing out fingers unnecessarily is a common habit of people. Criticizing sportspersons is a common example, one bad performance and viewers start thrashing their players. Sports analysts start raising questions about the selection of the player. That’s destructive criticism because it is adding no value to the player, to the team or to the sport overall.</p><p>On the contrary, on a bad performance, if a few analysts suggest changing the technique of the player similar to that of a successful one, to be honest, that’s asking too much. To please a few viewers one cannot change their entire technique, which might have made them successful. This sort of criticism will not add value either.</p><p>If an analyst suggests that the player must work on fitness, attitude, decision making or confidence, then that’s the catching point. These are the suggestions that make sense and if a player works on them, performance can be improved.</p><p>One should listen to all sorts of criticism but should only enact those suggestions which add value to one’s self. The same thing goes for the product you are working on. If you listen to all the customers or the end-users, you will end up integrating all those features into the product and that could make it more complex to use for the customers.</p><p>You cannot change yourself or your product to fulfil the requirements of a few people. If you hear a certain review from a huge number of end-user customers then make changes accordingly as it will create greater value.</p><h3><strong>Final Words</strong></h3><p>Change the way you work. Start thinking rather than just waiting for someone to order you to do something. Take a stand for yourself and live a productive and effective professional life. Your work life can become interesting if you start making an effort as without any effort you cannot change anything.</p><p><strong>Best of luck!!!!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/330/0*hKqCUlPNdHW39Kml" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d03201950388" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JS/TS Automation Best Practices]]></title>
            <link>https://medium.com/emumba/js-ts-automation-best-practices-dae419863bee?source=rss-bc85ccec31d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/dae419863bee</guid>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[qa]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[Usman Ghani]]></dc:creator>
            <pubDate>Wed, 04 Jan 2023 08:01:06 GMT</pubDate>
            <atom:updated>2023-01-04T08:01:06.651Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*_feTQNsxUOb6aORZ" /><figcaption>What are good coding practices for JS/TS?</figcaption></figure><h4>Tips to make your automation suite effective</h4><blockquote>“Automated testing is the process of writing a program that tests another program. Writing tests is a bit more work than testing manually, but once you’ve done it, you gain a kind of superpower: it takes you only a few seconds to verify that your program still behaves properly in all the situations you wrote tests for.”<br>― <strong>Marijn Haverbeke, </strong><a href="https://www.goodreads.com/work/quotes/13787033"><strong>Eloquent JavaScript: A Modern Introduction to Programming</strong></a></blockquote><p>Working as an automation engineer made me realize that my role as a tester is not much different than that of a developer. He is developing an application and I am developing code to test his application. Maintaining a test suite is not an easy task. When features are integrated into an application, you will also need to incorporate those features in your automation suite. When the suite will increase in size, you will have to be vigilant and aware of what techniques you are using to code.</p><blockquote>“The art of programming is the skill of controlling complexity.”<br>― <strong>Marijn Haverbeke, </strong><a href="https://www.goodreads.com/work/quotes/13787033"><strong>Eloquent JavaScript</strong></a></blockquote><p>Good coding practices make your test automation suite less complex, more readable and easy to use for your peers. If you do not follow good coding practices it will become difficult for you to manage your suite. If someone reads your code and does not understand what is happening or even if you visit your code after a few months and you do not get what is happening then:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Ff6BAgXzCk4IvK%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Ff6BAgXzCk4IvK%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2Ff6BAgXzCk4IvK%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/bbe75a7d8c35d7ecb377f112bfbac6e6/href">https://medium.com/media/bbe75a7d8c35d7ecb377f112bfbac6e6/href</a></iframe><p>I will now mention some coding practices that have helped me a lot in optimizing my automation test suite for clients and peers. It will surely help you too:</p><h3>Use Proper Naming Conventions</h3><p>The way you name the variable significantly impacts your code readability. If the variable and function name consists of random words, it will become difficult for you and your peers to understand the code. Let’s discuss some proper naming conventions for:</p><h4><em>Variable &amp; Functions</em></h4><p>The most common notation to write variables, files, and function names is the <strong>“camel case”</strong> notation. For a name to be in agreement with this convention the first letter of the name must be a small letter followed by every next word’s first letter being capitalized.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/0*Ro3onRH_O02Oqe6f" /><figcaption><em>Camel Case Notation</em></figcaption></figure><p>For example, &lt;<strong>getUserAge</strong>&gt; is a function name in which:</p><ul><li><strong>get</strong> -&gt; the first word is starting with a small letter</li><li><strong>user</strong> -&gt; the second word is starting with a capital letter</li><li><strong>age</strong> -&gt; the third word is starting with a capital letter</li></ul><h4>JSON Files</h4><p>There are multiple notations we can use to write the key and value pair:</p><ol><li>All the letters of the key must be capitalized, such as seen below;</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/293/0*xl5icCVJ72PtCKQ6" /><figcaption><em>Capitalized Keys</em></figcaption></figure><p>2. There can be spaces between the words in the keys, such as seen below;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/316/0*qj6aFAZPi8C-cHLQ" /><figcaption><em>Keys Having Space</em></figcaption></figure><p>3. Keys can have dashes instead of spaces in the name, such as seen below;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/313/0*BjBfoEXHsiqmtTZf" /><figcaption><em>Keys Having Dash</em></figcaption></figure><p>4. Keys can have camel case notation, such as seen below;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/302/0*tAoCxLQLmb_kFrW5" /><figcaption><em>Camel Case Keys</em></figcaption></figure><h3>Use Page Object Model</h3><p>Prior to understanding the advantages of the Page Object Model (POM), one must understand what POM is. POM is a methodology applied to increase code readability and maintainability. It requires us to follow a strict uniform pattern of file naming and placement and folder naming and placement that we ourselves previously define at the start of the project. The essence of POM is to allow others and ourselves to be able to intuitively access different components of the code without having to wonder much.</p><p>In order to create a POM influenced project structure you can either make a separate class or subfolders. In the former approach, you can create a class for each web page including attributes and methods i.e. locators, actions, assertions, and tasks. In the latter approach, you can make a separate folder for each web page having several subfolders such as locators, actions, assertions, or tasks. It has many advantages:</p><h4>Easy Maintenance</h4><p>Continuous development and maintenance of the application may affect locators of the web elements. If you have integrated POM into your project you do not have to change the locator at multiple places. You just need to change the attribute in the case of a class or change the variable value in the other case.</p><h4>Reusability</h4><p>As mentioned earlier, in a POM influenced project each web page has a different file or class so the function of one screen can be used for another screen. This allows you to write generic functions which means they can be reused and save loads of time.</p><p>For example, if you have a home page with different tabs you do not have to make separate functions or locators to click those tabs. You can make parameterized locator and function to cater for all cases.</p><p>When we navigate to the <a href="https://www.saucedemo.com/inventory.html">Sauce Demo</a> website, we can see a menu button on the top left which we can click to see different options:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yG-_UfKTENrSWL6p" /><figcaption><em>Sauce lab demo website</em></figcaption></figure><p>For the tabs above mentioned you do not need to make separate locators, you just need a parameterized locator:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/0*3m1mb8iU9gHeQ8jN" /><figcaption><em>Parameterized Locator Function</em></figcaption></figure><p>As shown below, now, we can call the same function to perform click actions on different menu option buttons:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/392/0*zzL3RT5sno2eq52S" /><figcaption><em>The same function for different actions</em></figcaption></figure><h3>Use Good Assertions Libraries</h3><p>There are two types of assertions namely; <strong>soft</strong> and <strong>hard</strong>. In <strong>soft assertions</strong>, if the assertion fails in the middle of a test scenario, it will <strong>continue</strong> to execute other steps and in the end, all the failed assertions will be displayed in the report (if configured) and also the terminal. In <strong>hard assertions</strong>, if an assertion fails in the middle of a test scenario, it will <strong>halt</strong> the execution of the remaining steps. The failed assertion will be displayed in the report (if configured) and the terminal.</p><p>JavaScript or TypeScript based frameworks such as WebdriverIO, Cypress, etc. all have some built-in assertion libraries but if you do not find them helpful, you can use these instead:</p><h4>Soft-assert</h4><p>Soft-assert is a javascript-based library used for soft assertions. It mostly covers all sorts of assertions except the one in which you must verify that expected and actual values are not equal. In that case, you need to look for other alternatives. To get more help on how to install and use the soft-assert library, you can visit this <a href="https://www.npmjs.com/package/soft-assert"><em>link</em></a>.</p><h4>Assert</h4><p>Assert is a javascript-based library used for hard assertions. It covers all sorts of assertions. To get more help on how to install and use the assert library, you can visit this <a href="https://www.npmjs.com/package/assert">link</a>.</p><h3>Use Support Files</h3><p>Support files are sort of an extension of POM. You can create a <strong>utils</strong> folder to store all the files which are common for your project. They can be files related to timeouts, default data, common actions, assertions, etc. The advantage of these common files is that you do not have to change the timeout values in every script and can just go to your utils folder, and open the specific file to make a change.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/277/0*099PADsRqLH3KYN_" /><figcaption>Timeout utils</figcaption></figure><p>Credentials can be set either for single or multiple environments depending upon the requirement of automation suites. For example,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/252/0*DPNbiI4GaEr_QQH1.png" /><figcaption><em>Multiple Environment Credentials</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/376/0*-2Aj4ouyqbWHhKYf" /><figcaption><em>Single Environment Credentials</em></figcaption></figure><p>Similarly, the default data of a website can be set in a JSON file in the utils folder which can be used in the test suite. For example, we can take an example of the OTT platform.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pFogrq4owEo5_2vC" /><figcaption><em>Netflix Home page</em></figcaption></figure><p>There are some TV shows and movies that are always present on the platform due to their ratings and good reviews. Their names can be stored in the JSON file as discussed above. Then that JSON file can be used anywhere in the script and in case of removal of any movie or show you need to change its name in the JSON file only and not everywhere else.</p><p>Calling the same sets of commands before performing an action such as a click or hover or any other action may not only reduce the readability of the code but also require us to put in extra time and effort. To avoid this we can make a common action file named <strong>“browserAction.utils” </strong>which may contain all the actions which we will need for our test suite.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/0*y3nziSqrsa4TX2YA.png" /><figcaption><em>Browser Action Utils</em></figcaption></figure><p>Similarly, we can do the same for assertions as well. We do not need to import the assertion libraries in every script as they can be imported in just one file. That file can contain all sorts of assertions either hard or soft, and then you can make a file named <strong>“browserAssertions.utils” </strong>under the utils folder and simply import that everywhere you need it. For example,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/324/0*jFyxcczfTuZVlDYB.png" /><figcaption><em>Browser Assertion Utils</em></figcaption></figure><p>As mentioned in the soft assert section that in the last assertion you need to use the softAssertAll() command to view the results of assertions. For the assertion functions, you can use an optional variable to notify whether the assertion is last or not.</p><h3>Use Asynchronous Mode</h3><p>In synchronous mode, the actions are queued up i.e. the commands are executed sequentially. Every command waits for the previous command to complete, even if it is not dependent on the result of that command.</p><p>Asynchronous is a <strong><em>“promise-based”</em></strong> behaviour mode, it makes sure that the thread is completed successfully and does not break. All commands that aren’t otherwise explicitly told not to, run at the same time. Hence if a command requires output from another command and both are running in parallel, that command will take in a resolved “promise” as the missing information for the function. To work in asynchronous mode, you can use the <strong>“async/await”</strong> analogy to combat this.</p><p><strong>Async</strong> will be used with the function and it will always return a promise. <strong>Await </strong>is used to wait for the promise to return, it won’t move ahead until a promise is returned. Await can only be used inside an <strong>asynchronous/async</strong> block.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/342/0*Kv1qvvvpQ2xHOLax" /><figcaption><em>async/await snippet</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/153/0*VTiYugghEpVrhMVd" /><figcaption>async/await output</figcaption></figure><h3>Crux</h3><p>A QA automation engineer is no less than a developer. Following good coding practices will help you optimize your test automation suite. You are doing something valuable i.e reducing manual efforts, then do it in an efficient manner. In case of any query or suggestion, feel free to reach out to me via <a href="/service/mailto:usman.ghani@emumba.com">Email</a> or <a href="https://www.linkedin.com/in/usmanghani786/">LinkedIn</a>, or <a href="https://www.instagram.com/usman_ghani18/">Instagram</a>.</p><p>Happy Coding!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FAGwIZRLDABe1i%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fmovie-harry-potter-AGwIZRLDABe1i&amp;image=https%3A%2F%2Fmedia2.giphy.com%2Fmedia%2FAGwIZRLDABe1i%2F200.gif%3Fcid%3D790b7611755828c925b11afb0825c054ad492f04584a3bbc%26rid%3D200.gif%26ct%3Dg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="245" frameborder="0" scrolling="no"><a href="https://medium.com/media/39ac6f0eb4aee2573cb60bb7888911ac/href">https://medium.com/media/39ac6f0eb4aee2573cb60bb7888911ac/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dae419863bee" width="1" height="1" alt=""><hr><p><a href="https://medium.com/emumba/js-ts-automation-best-practices-dae419863bee">JS/TS Automation Best Practices</a> was originally published in <a href="https://medium.com/emumba">Emumba</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Revelio Pathway to become a QA Automation Engineer]]></title>
            <link>https://medium.com/emumba/revelio-pathway-to-become-a-qa-automation-engineer-517965f9b32c?source=rss-bc85ccec31d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/517965f9b32c</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[qa]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[Usman Ghani]]></dc:creator>
            <pubDate>Thu, 21 Jul 2022 06:25:19 GMT</pubDate>
            <atom:updated>2022-07-21T06:25:19.600Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UEUYp3pouS0_L4vK9fTJSQ.jpeg" /><figcaption>Revelio Pathway</figcaption></figure><h4>General Pathway to becoming a QA Engineer</h4><p>Switching to the software side is scary, I get it, because of all the new stuff you got to learn. It was scary for me as well when I decided to become a QA Engineer but I believed in what Professor Dumbledore always said:<strong> “It is our choices that really show what we truly are, far more than our abilities”</strong>. It really depicts that he believed in the growth mindset and so do I.</p><h3><strong>Background</strong></h3><p>I graduated from a top university in 2020 with a Bachelor of Electrical Engineering. When I enrolled in the Department of Electrical Engineering, I had no clue what I was signing up for. As the semesters proceeded and I learned more about my courses, I realised that EE does not align with my interests and personality. My performance was not up to the mark, my grades were declining continuously and the time for my graduation was getting nearer and nearer. I was deep in the rabbit hole and could not find a way out.</p><p>One of my friends suggested watching movies for motivation. So I randomly downloaded a movie named “Iron Man” and that man changed this man’s life. I was fascinated by how that suit worked, and how he used computers to make that suit more functional. I finally found something that piqued my interest, something that clicked my curiosity, it was time to dive into the coding stuff and swim against the waves.</p><p>In my final year, I selected Artificial Intelligence and Computer Vision as my majors as they involved programming. I still didn’t have a clear career goal and the kind of job I would be pursuing after graduation, But I knew I would find a way. I motivated myself by repeating one slogan “I will find a way out”. It was not an easy journey but it taught me a lot.</p><h3><strong>Stepping into a </strong>whole <strong>new world</strong></h3><h4>Select a Tech Stack</h4><p>To begin a career in the software industry on the testing or development side, the first step is to select a programming language. I chose Python. After selecting a programming language, the next step should be to learn its basics and for that, I started looking for online platforms. Now, I will list down the platforms where you can learn and practice basic programming.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*JcKlCAnsZkKVIQL6_QR3xw.gif" /></figure><p>I was looking for an open-source platform where I could learn the basics of Python. A friend of mine suggested <strong>Coursera. </strong>You won&#39;t earn a certificate on a free course but it can be a good starting point.</p><h4><strong>Coursera</strong></h4><p>I found a course on <strong>Coursera</strong> which had all the basic elements in it:</p><ol><li>Installation</li><li>Basic Syntax</li><li>Conditionals</li><li>Collections</li><li>Regex</li><li>Short Exercises</li></ol><p>Enrol in this course and start learning Python.</p><p><a href="https://www.coursera.org/learn/python?specialization=python">Programming for Everybody (Getting Started with Python)</a></p><p>When that course was completed, I was in search of a platform where I can solve different problems to enhance my programming skills and as I was working on Python, so I was specifically looking for python problems. I found an online platform named, <strong>Datacamp.</strong></p><h4><strong>Datacamp</strong></h4><p>On <strong>Datacamp</strong>, a course usually consists of short lectures and a lot of exercises to practice the key concepts. I did some problems practising here:</p><p><a href="https://app.datacamp.com/learn/courses/intro-to-python-for-data-science">https://app.datacamp.com/learn/courses/intro-to-python-for-data-science</a></p><p><a href="https://app.datacamp.com/learn/courses/intermediate-python">https://app.datacamp.com/learn/courses/intermediate-python</a></p><p>It is a good platform but mostly focuses on Data Science and Machine Learning so if your interest lies there you can dig that platform a bit more. This platform is paid and just offers one course for free so if you are looking for an open-source platform, <strong>Datacamp</strong> is not an ideal one.</p><p>When I was learning and practising programming, one of my university seniors told me about the QA Engineer job. The role sounded very exciting to me. To be a good QA, one must be proficient in a programming language, hot languages for automation were JavaScript and Java. I decided to learn the basics of JavaScript. I started to search online platforms to learn and practice JavaScript. During a discussion with my friend, he suggested <strong>LinkedIn Learning</strong>.</p><h4><strong>LinkedIn Learning</strong></h4><p>You can do one free course on LinkedIn without a premium account. I found a course that covered:</p><ol><li>Difference between the scope of let, var and const</li><li>Conditionals</li><li>Functions</li><li>Small exercises</li><li>A slight touch of web development</li><li>Event Handlers</li></ol><p>It is just a 6 hours course which can strengthen your JavaScript base.</p><p><a href="https://www.linkedin.com/learning/javascript-essential-training/javascript-the-soil-from-which-the-modern-web-grows?autoplay=true">JavaScript: The soil from which the modern web grows - JavaScript Video Tutorial | LinkedIn Learning, formerly Lynda.com</a></p><p>A QA must have good problem-solving skills and logic-building skills. To improve your problem-solving and logic-building skills one must keep practising programming problems. Practising problems not only boost your confidence but also broaden your vision. After some research, I found a platform named <strong>CodeSignal</strong>.</p><h4><strong>CodeSignal</strong></h4><p>It will help you in many ways, some of which are listed here:</p><ol><li>Learn to understand a problem and identify which things to resolve to reach the answer</li><li>Programming skills will enhance as you will get to know different methods and keywords.</li><li>Learn code optimization</li><li>Learn time complexity reduction</li></ol><p>You can visit the platform using this:</p><p><a href="https://app.codesignal.com/">https://app.codesignal.com/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EG-D2SdBk0jIz6bqpE3ufQ.png" /><figcaption>CodeSignal Home Page</figcaption></figure><p>Hover over the CodeSignal label, this drop-down will appear and then click the Arcade button to open a different section. Just click any section and start solving problems.</p><p><a href="https://app.codesignal.com/arcade">CodeSignal</a></p><p>QA role is not confined to just testing the UI/UX of the application or just doing some functional testing, it’s much more than that. The role of QA starts when the client hands over the requirement to the development team. Reviewing the designs or mocks, verification and validation of the application according to the requirement document and much more comes under a QA. Simultaneous development and testing make a product much better.</p><h4><strong>QA Role in Software Development</strong></h4><p>To get a better grip on Software Development Life Cycle or SDLC, Agile vs Waterfall Method, different sorts of testing, V Model and much more you can find on this site, it will help you a lot.</p><p><a href="https://www.guru99.com/software-testing.html">Software Testing Tutorial</a></p><p>A QA is incomplete without manual testing touch. So I aimed to learn manual testing things as well. One of my seniors told me about <strong>Test Automation University. </strong>When I explored it, I found it quite exciting as a lot of courses were present related to automation and manual testing.</p><h4><strong>Test Automation University</strong></h4><p>I chose the JavaScript path but it is up to you which path you want to choose.</p><p><a href="https://testautomationu.applitools.com/learningpaths.html">Learning Paths | Applitools</a></p><p>On this platform, you can learn things related to manual testing such as API testing, performance testing, load testing and etc. You can learn about how to use GitHub or git for continuous integration which can help you set up project repositories. You can get basic concepts related to continuous deployment and its tool as well.</p><p>In automation, one of the backbone skills is how good a selector you can make. Selectors or web element locator is basically a reference of the element which you use in your code to interact with that element. For example, there is a search box and you want to type something in it using automation. You will inspect that search box and will look for a unique class, id or attribute which will help you to interact with that search box using your code. If these terms sound alien to you, do not worry, just go through this course and it will help you a lot.</p><p><a href="https://testautomationu.applitools.com/web-element-locator-strategies/">Web Element Locator Strategies</a></p><h4>Conclusion</h4><p>The certifications mentioned above will surely boost your resume and portray how good your learning attitude is. One thing which is significant but we ignore is, how to make a proper portfolio. When you complete any course and receive a certificate, post it on your LinkedIn wall immediately.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*XVYP-x_iVZ32rKzKK6UqAg.gif" /></figure><p>My last tip will be that do not procrastinate or be flabbergasted about where to start. Just follow this pathway and it will help you become a first semester wizard in the world of QA. Voila!!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*CgB3CKSkURC9RKeW9GUVtw.png" /></figure><p>Always remember <strong>“ happiness can be found even in the darkest of times if one only remembers to turn on the light”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*cFENWd5Zs9WMOt3WgJAnlA.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=517965f9b32c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/emumba/revelio-pathway-to-become-a-qa-automation-engineer-517965f9b32c">Revelio Pathway to become a QA Automation Engineer</a> was originally published in <a href="https://medium.com/emumba">Emumba</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to use alias in webdriverIO]]></title>
            <link>https://medium.com/emumba/how-to-use-alias-in-webdriverio-fe6530f9fe95?source=rss-bc85ccec31d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/fe6530f9fe95</guid>
            <category><![CDATA[webdriverio]]></category>
            <category><![CDATA[sdet]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[qa]]></category>
            <dc:creator><![CDATA[Usman Ghani]]></dc:creator>
            <pubDate>Wed, 16 Mar 2022 09:48:11 GMT</pubDate>
            <atom:updated>2022-03-18T09:32:06.021Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aZFBqCWMb6W2lV9HqsHJNw.jpeg" /><figcaption>WDIO</figcaption></figure><h3>How to use import alias in webdriverIO?</h3><h4>Getting rid of messy imports in test automation</h4><h4><strong>Introduction:</strong></h4><p>Nowadays, I am working with WebdriverIO, TypeScript, and Cucumber as a BDD tool. BDD is a behavior-driven development which basically means that the behavior of the application is tested using Cucumber. Our project structure looks like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/237/0*R2YaigiLZKVym2EQ" /><figcaption><strong>Fig 1: Project Directory</strong></figcaption></figure><p>To import files from the main directory to the <strong>“stepDefinitions”</strong> directory, long relative paths will be required which will adversely affect the readability of the code. For Example,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/0*8Ex7eEo1nsM7ZLVU" /><figcaption><strong><em>Fig 2: Horrid Imports</em></strong></figcaption></figure><p>To improve the readability of the code we use an import alias. Import alias is that you take a standard import. Instead of using a relative path, you define an absolute path under a name. When you import that module you will use the name that is registered by you to import the files from the particular directory. For example,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/629/0*BaBFOpYuNcRaxPKh" /><figcaption><strong>Fig 3: Import Alias</strong></figcaption></figure><h3>How to write Alias and where to write them?</h3><p>If you are using TypeScript, the import alias is by default supported. You have to do a couple of configurations in <strong>“compilerOptions”</strong> in the <strong>tsconfig.json</strong></p><ul><li>You have to set the main directory from which you will import files so in our case the main directory will be <strong>“main”</strong>. Then define the path for which you want to standardize the import.</li><li>For example, “main” is set as a baseUrl because it is the main directory from where we will import files, and then we have defined a path for the ongoingEventFlow directory which is inside the “main” folder from where we will import the files of ongoingEventFlow (for the better visualization of the directories refer to Fig 1).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/0*w8skguyWXLpIzPuh" /><figcaption><strong><em>Fig 4: Import Alias Configuration</em></strong></figcaption></figure><p>If you are not using TypeScript, you can install a plugin named “module-alias”.</p><ul><li>First of all, install the plugin using the command &lt;npm i module-alias –save-dev&gt;</li><li>Add custom configuration in the package.json file:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/0*16T34U1VgFe7fmv0" /><figcaption><strong><em>Fig 5: Module Alias configuration</em></strong></figcaption></figure><ul><li>Now add this line of code in your main file which you want to run, if not using webdriverIO: &lt;require(‘module-alias/register’)&gt;</li><li>Now you can use the alias for the import in your files.</li></ul><p><strong>Note</strong>: The official document for module-alias is <a href="https://www.npmjs.com/package/module-alias">here</a>.</p><p>If you are working with webdriverIO then there are some extra steps you need to do in order to run your webdriverIO test.</p><h3>How to register paths in WebdriverIO</h3><p>You have to do the following steps in order to run the TypeScript cucumber test in WebdriverIO with import alias:</p><ul><li>Install a plugin, <strong>“tsconfig-paths”</strong>, using this command &lt;npm install — save-dev tsconfig-paths&gt;</li><li>Then register the paths in your wdio configuration file under <strong>“cucumberOpts”</strong> using <strong>“tsconfig-paths/register”</strong> in the <strong>“requireModule”</strong> array:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/969/0*cHD68XLgQ6WFKLLW" /><figcaption><strong><em>Fig 6: Register Path in Wdio configuration file</em></strong></figcaption></figure><p>In order to run your JavaScript cucumber test in webdriverIO with import alias, do the following steps:</p><ul><li>Install the “module-alias” plugin as mentioned in the previous section.</li><li>Then register the paths in your wdio configuration file under <strong>“cucumberOpts”</strong> using <strong>“module-alias/register”</strong> in the <strong>“requireModule”</strong> array:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/969/0*4zpW4S4Z3MsuXNyp" /><figcaption><strong><em>Fig 7: Register Path in Wdio configuration file</em></strong></figcaption></figure><h3>Crux</h3><p>Import alias can be very handy and it can be easily configured with the webdriverIO. It can resolve that horrid and lengthy relative paths import problem. Your code will be readable and presentable.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe6530f9fe95" width="1" height="1" alt=""><hr><p><a href="https://medium.com/emumba/how-to-use-alias-in-webdriverio-fe6530f9fe95">How to use alias in webdriverIO</a> was originally published in <a href="https://medium.com/emumba">Emumba</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>