<?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 Mahesh Khanna on Medium]]></title>
        <description><![CDATA[Stories by Mahesh Khanna on Medium]]></description>
        <link>https://medium.com/@maheshkhanna?source=rss-2e6576ff5700------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*QkkoHRSk3SVTX8QxpyG7xg.jpeg</url>
            <title>Stories by Mahesh Khanna on Medium</title>
            <link>https://medium.com/@maheshkhanna?source=rss-2e6576ff5700------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 09:53:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@maheshkhanna/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[Schwerer Gustav: A Masterpiece of Engineering That Proves Why Over-Engineering Fails]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@maheshkhanna/schwerer-gustav-a-masterpiece-of-engineering-that-proves-why-over-engineering-fails-61197c935379?source=rss-2e6576ff5700------2"><img src="https://cdn-images-1.medium.com/max/2600/1*GVC2z9F0Gx8WpEkaP1n3HQ.jpeg" width="3018"></a></p><p class="medium-feed-snippet">If you&#x2019;re unable to view the full article, you can read it here</p><p class="medium-feed-link"><a href="https://medium.com/@maheshkhanna/schwerer-gustav-a-masterpiece-of-engineering-that-proves-why-over-engineering-fails-61197c935379?source=rss-2e6576ff5700------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@maheshkhanna/schwerer-gustav-a-masterpiece-of-engineering-that-proves-why-over-engineering-fails-61197c935379?source=rss-2e6576ff5700------2</link>
            <guid isPermaLink="false">https://medium.com/p/61197c935379</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[system-design-concepts]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[lessons-learned]]></category>
            <dc:creator><![CDATA[Mahesh Khanna]]></dc:creator>
            <pubDate>Sun, 18 Jan 2026 12:16:43 GMT</pubDate>
            <atom:updated>2026-01-18T12:18:32.949Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[LLMs Unlocked: How Assigning a Role “Jailbreaks” AI Safeguards]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@maheshkhanna/llms-unlocked-how-assigning-a-role-jailbreaks-ai-safeguards-a1660def03e6?source=rss-2e6576ff5700------2"><img src="https://cdn-images-1.medium.com/max/1640/1*4eGPGfwZTKxxcnl3rsIFKA.png" width="1640"></a></p><p class="medium-feed-snippet">Note for Non-Medium Users:
If access to this article is restricted. Use this link&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@maheshkhanna/llms-unlocked-how-assigning-a-role-jailbreaks-ai-safeguards-a1660def03e6?source=rss-2e6576ff5700------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@maheshkhanna/llms-unlocked-how-assigning-a-role-jailbreaks-ai-safeguards-a1660def03e6?source=rss-2e6576ff5700------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1660def03e6</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[gemini]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[prompt-engineering]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Mahesh Khanna]]></dc:creator>
            <pubDate>Fri, 05 Sep 2025 14:01:27 GMT</pubDate>
            <atom:updated>2025-09-05T14:05:09.133Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Simple RAG Implementation on a Local Machine with Zero Coding]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@maheshkhanna/simple-rag-implementation-on-a-local-machine-with-zero-coding-f25db190e0d7?source=rss-2e6576ff5700------2"><img src="https://cdn-images-1.medium.com/max/1988/1*VDB_n5NmJxX1HFgYGDLlQA.png" width="1988"></a></p><p class="medium-feed-snippet">What is RAG?</p><p class="medium-feed-link"><a href="https://medium.com/@maheshkhanna/simple-rag-implementation-on-a-local-machine-with-zero-coding-f25db190e0d7?source=rss-2e6576ff5700------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@maheshkhanna/simple-rag-implementation-on-a-local-machine-with-zero-coding-f25db190e0d7?source=rss-2e6576ff5700------2</link>
            <guid isPermaLink="false">https://medium.com/p/f25db190e0d7</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[llm-applications]]></category>
            <category><![CDATA[aı]]></category>
            <category><![CDATA[anythingllm]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Mahesh Khanna]]></dc:creator>
            <pubDate>Wed, 25 Jun 2025 13:38:46 GMT</pubDate>
            <atom:updated>2025-06-25T13:38:46.551Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Solitary vs. Sociable Unit Tests]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@maheshkhanna/solitary-vs-sociable-unit-tests-66471cc81f82?source=rss-2e6576ff5700------2"><img src="https://cdn-images-1.medium.com/max/892/1*RTYkHJC8Gz75VYtl22w-TA.png" width="892"></a></p><p class="medium-feed-snippet">When writing unit tests, developers often encounter two distinct styles: solitary and sociable unit tests. Understanding the difference&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@maheshkhanna/solitary-vs-sociable-unit-tests-66471cc81f82?source=rss-2e6576ff5700------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@maheshkhanna/solitary-vs-sociable-unit-tests-66471cc81f82?source=rss-2e6576ff5700------2</link>
            <guid isPermaLink="false">https://medium.com/p/66471cc81f82</guid>
            <category><![CDATA[unitest]]></category>
            <category><![CDATA[unit-test-framework]]></category>
            <category><![CDATA[unit-test-coverage]]></category>
            <category><![CDATA[testing-tools]]></category>
            <category><![CDATA[automation-testing]]></category>
            <dc:creator><![CDATA[Mahesh Khanna]]></dc:creator>
            <pubDate>Sat, 21 Jun 2025 10:19:50 GMT</pubDate>
            <atom:updated>2025-06-21T10:19:50.111Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Understanding Mocks and Fakes in Software Testing]]></title>
            <link>https://medium.com/@maheshkhanna/understanding-mocks-and-fakes-in-software-testing-55772475e81f?source=rss-2e6576ff5700------2</link>
            <guid isPermaLink="false">https://medium.com/p/55772475e81f</guid>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[test-automation]]></category>
            <category><![CDATA[unit-testing]]></category>
            <category><![CDATA[automation-testing]]></category>
            <category><![CDATA[mockito]]></category>
            <dc:creator><![CDATA[Mahesh Khanna]]></dc:creator>
            <pubDate>Sat, 01 Mar 2025 19:00:05 GMT</pubDate>
            <atom:updated>2025-03-01T19:02:53.946Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction:</strong></p><p>In the realm of software testing, the employment of test doubles is indispensable.Test doubles are objects used in software testing to mimic the behavior of real objects. They provide controlled environments for tests, allowing developers to isolate and test specific components without relying on external dependencies.</p><p>Common types of test doubles include stubs, mocks, fakes, and dummies, each serving different purposes, such as providing predefined responses, verifying interactions, or simulating complex behavior.</p><p>This article delves into two prevalent types of test doubles: mocks and fakes.</p><h4><strong>Test Doubles in Action</strong></h4><p>Consider a student data management application where the core logic is implemented in the StudentAPI module, while database operations are handled separately in the StudentDAO module.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*jdQoOtonW5ZOTlQDVAby3w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*PRs1sIph0SJJf7bDFk6Q_w.png" /></figure><p>For unit testing our student data management app, a test double will replace the StudentDAOclass handling database operations. This allows tests to focus on the business logic without actual database interactions.</p><h4><strong>Mocks</strong></h4><p>Mocks are primarily used to verify the interactions between our API classes and the database action classes. Using a mocking framework like Mockito, or a custom mock class, we can simulate these interactions. The mock object records methods called and arguments passed, allowing assertions based on these interactions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*MMbRvfLqr_rFXGYV7K3ZiQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*q8JFXtvVA7wvmai4G3GOcw.png" /></figure><p>When a test uses a mock, it follows a structured pattern:</p><ol><li><strong>Sets the expectations</strong> — Defines expected method calls and interactions.</li><li><strong>Performs the operations</strong> — Executes the code under test.</li><li><strong>Asserts the interactions</strong> — Verifies that expected interactions occurred as defined.</li></ol><p><strong>Pros of Using Mocks in Testing:</strong></p><ul><li>Facilitates unit testing in isolation, enhancing test precision.</li><li>Enables verification of specific behaviors and interactions, such as method calls.</li><li>Simplifies the process of testing error scenarios.</li><li>Initially quicker to write and implement.</li></ul><p><strong>Cons of Using Mocks in Testing:</strong></p><ul><li>Can become brittle as they often tie closely to implementation details.</li><li>May result in over-specification, where tests become too detailed or complex.</li><li>Provides less realistic testing scenarios compared to integration tests.</li><li>Readability of tests may decrease as the number of mocks in a test increases.</li></ul><h4>Fakes</h4><p>Fakes are objects that have working implementations, but not the same as production, usually simpler and lighter than production implementations. For example, a fake database that uses an in-memory store rather than performing actual DB operations. Fakes can handle a wider range of scenarios than stubs but are usually hand-crafted to suit the test environment and are typically more complex than mocks or stubs.</p><p>For example, in our case, the FakeStudentDAO class acts as an in-memory database, handling operations like storing, retrieving, and deleting data within an in-memory storage system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*ElZV-6Wgd1Wq0KAz9IfI4g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*O6SUu7IfQNtKhNe8QlVnVQ.png" /></figure><p>When a test uses a fake, it follows a different pattern:</p><ol><li><strong>Performs the operations</strong> — Executes the code under test.</li><li><strong>Asserts the behavior</strong> — Verifies the expected outcome, rather than specific method calls.</li></ol><p><strong>When to Use Mocks:</strong></p><ul><li>Testing Units in Isolation</li><li>Verifying Specific Interactions</li><li>Testing Error Handling</li><li>Writing Unit Tests</li></ul><p><strong>When to Use Fakes:</strong></p><ul><li>Testing Integration Scenarios</li><li>Need More Realistic Behavior</li><li>Writing <a href="https://medium.com/@maheshkhanna/acceptance-testing-43954b401928">Acceptance Tests</a></li><li>Need a Working Implementation for Development</li></ul><p><strong>In summary:</strong></p><ul><li>Use a <strong>mock</strong> when you need to verify the interactions between the system under test and the mocked object.</li><li>Use a <strong>fake</strong> when you need a more functional simulation of an external system or service but don’t want the complexity of the real implementation.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6wGrYfMhouIHgb79-QUBVA.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=55772475e81f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Revolutionizing Automation Testing with Browser AI Agents]]></title>
            <link>https://medium.com/@maheshkhanna/revolutionizing-automation-testing-with-browser-ai-agents-accd8d82abd6?source=rss-2e6576ff5700------2</link>
            <guid isPermaLink="false">https://medium.com/p/accd8d82abd6</guid>
            <category><![CDATA[ai-test-automation]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[browser-automation]]></category>
            <category><![CDATA[automation-testing]]></category>
            <category><![CDATA[testing]]></category>
            <dc:creator><![CDATA[Mahesh Khanna]]></dc:creator>
            <pubDate>Sat, 08 Feb 2025 08:05:47 GMT</pubDate>
            <atom:updated>2025-02-08T08:05:47.706Z</atom:updated>
            <content:encoded><![CDATA[<p>Recently, I stumbled upon an incredibly cool tool — <strong>Browser AI Agent</strong>. It was fascinating to see artificial intelligence take control of the browser, performing actions based on simple prompts. All you need to do is describe what you want, and the AI handles the rest! Check out these links to explore more:</p><ul><li><a href="https://browser-use.com/">Browser Use Official Website</a></li><li><a href="https://github.com/browser-use/browser-use">Browser Use GitHub Repository</a></li></ul><p>After experimenting with it, a thought crossed my mind: <strong>Can we leverage this for automation testing?</strong></p><h3>Rethinking Traditional Automation Testing</h3><p>In the traditional automation testing approach, we meticulously design test cases and write code to execute them. Manual testing, on the other hand, involves documenting test cases and manually performing each step.</p><p>But with <strong>Browser Use</strong> in the picture, things could be simplified. Imagine if <strong>just defining the test cases</strong> was enough, without the need to write detailed automation scripts. Intriguing, right?</p><p>Let’s see how this AI agent performs.</p><h3>Putting Browser Use to the Test</h3><p>Consider the following basic test cases:</p><ol><li><strong>Unsuccessful Login Attempt</strong></li><li><strong>Successful Login Attempt</strong></li></ol><h3>Test Case Details:</h3><p><strong>Test Case 1: Unsuccessful Login Attempt</strong></p><ul><li><strong>Step 1</strong>: Open <a href="https://www.saucedemo.com/">https://www.saucedemo.com/</a></li><li><strong>Step 2</strong>: Enter <strong>username</strong>: standard_user and <strong>password</strong>: demo</li><li><strong>Step 3</strong>: Verify that login fails and the user is not redirected to the products page.</li></ul><p><strong>Test Case 2: Successful Login Attempt</strong></p><ul><li><strong>Step 1</strong>: Open <a href="https://www.saucedemo.com/">https://www.saucedemo.com/</a></li><li><strong>Step 2</strong>: Enter <strong>username</strong>: standard_user and <strong>password</strong>: secret_sauce</li><li><strong>Step 3</strong>: Verify that login is successful and the products page is displayed.</li></ul><h3>Crafting the AI Prompt</h3><p>Now, instead of coding each test, I simply crafted a prompt for the AI agent:</p><blockquote>“Consider yourself an automation tester. I need you to perform the following test cases and generate a detailed HTML report.</blockquote><blockquote><strong><em>Test Case 1</em></strong><em>: User should not be able to log in with incorrect credentials.</em></blockquote><blockquote>Step 1: Open <a href="https://www.saucedemo.com/">https://www.saucedemo.com/</a></blockquote><blockquote>Step 2: Enter username as standard_user and password as demo</blockquote><blockquote>Step 3: Confirm that login fails.</blockquote><blockquote><strong><em>Test Case 2</em></strong><em>: The products page should be listed after logging in with correct credentials.</em></blockquote><blockquote>Step 1: Open <a href="https://www.saucedemo.com/">https://www.saucedemo.com/</a></blockquote><blockquote>Step 2: Enter username as standard_user and password as secret_sauce</blockquote><blockquote>Step 3: Verify that the products page is displayed.”</blockquote><p>I then added this prompt to a simple Python script, executed it, and watched in awe as the AI agent opened the browser and began performing the tests automatically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XP_DidqD6LkY_9bGIfpOtg.png" /><figcaption>check the browserUser github link for more details on this code</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rAgkRapxiOr1SgfuoO5L8g.gif" /><figcaption>browser actions done by the agent</figcaption></figure><p><strong>Even better?</strong> The agent generated a detailed HTML report as instructed!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-UO6nSIF5qErEOmKqVAg9A.png" /></figure><h3>Conclusion: A Game Changer with Caveats</h3><p>This feels like a <strong>significant leap forward</strong> in the world of automation testing. However, while the AI agent performs remarkably well, there are areas that require caution.</p><p>For instance, in one scenario, I instructed the agent to click on the <em>Sign Up</em> button. The AI successfully clicked the button — but here’s the catch: even if the button had a typo in its label, the AI would still have clicked it without hesitation. This highlights the need for <strong>refining prompts</strong> and incorporating error-handling mechanisms to make the agent smarter and more discerning.</p><h3>Final Thoughts</h3><p><strong>Browser Use AI Agent</strong> opens up exciting possibilities in automation testing, reducing the need for writing extensive code. However, it’s essential to remain vigilant about prompt precision and ensure the AI’s actions are aligned with the intended outcomes.</p><p>Have you tried using AI tools like this in your testing workflow? I’d love to hear your experiences and thoughts in the comments below!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=accd8d82abd6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Acceptance Testing]]></title>
            <link>https://medium.com/@maheshkhanna/acceptance-testing-43954b401928?source=rss-2e6576ff5700------2</link>
            <guid isPermaLink="false">https://medium.com/p/43954b401928</guid>
            <category><![CDATA[test-pyramid]]></category>
            <category><![CDATA[acceptance-testing]]></category>
            <category><![CDATA[acceptance-tests]]></category>
            <category><![CDATA[acceptance-criteria]]></category>
            <category><![CDATA[test-strategy]]></category>
            <dc:creator><![CDATA[Mahesh Khanna]]></dc:creator>
            <pubDate>Sun, 26 Jan 2025 15:50:18 GMT</pubDate>
            <atom:updated>2025-01-26T15:50:18.485Z</atom:updated>
            <content:encoded><![CDATA[<h3>What is Acceptance Testing?</h3><p>Acceptance testing is software testing that verifies that a system meets the business and technical requirements that guide its design and development. It is typically performed by the customer, end-user, or a representative of the customer or end-user, and is intended to determine whether the system is acceptable for use.</p><h3>Reason behind Acceptance testing</h3><p>Once the software has undergone Unit Testing, Integration Testing and System Testing so, Acceptance Testing may seem redundant, but it is required due to the following reasons.</p><ul><li>During the development of a project if there are changes in requirements and it may not be communicated effectively to the development team.</li><li>Developers develop functions by examining the requirement document on their own understanding and may not understand the actual requirements of the client.</li></ul><p>Acceptance testing is an important step in the software development process for several reasons:</p><ul><li>Ensuring that the software meets the customer’s requirements: Acceptance testing helps to ensure that the software meets the customer’s requirements and is fit for its intended purpose. This is important as it helps to ensure customer satisfaction and reduces the likelihood of rework or customer complaints.</li><li>Identifying and solving problems: Acceptance testing helps to identify and solve problems such as incorrect functionality, user interface issues, performance issues, and security issues. This is important as it helps to ensure that the software is of high quality and ready for deployment.</li><li>Improving communication between the development team and the customer: Acceptance testing helps to improve communication between the development team and the customer, as it allows the customer to provide feedback and review the software before it is deployed.</li><li>Cost saving: Acceptance testing is a cost-effective way to ensure that the software is of high quality and meets the customer’s requirements. By identifying and solving problems early in the development process, it can save costs associated with fixing issues after deployment.</li></ul><h3>Properties of Acceptance Test</h3><ul><li><strong>Validating User Expectations:</strong> Ensuring that features align with user requirements.</li><li><strong>Defining “Done”:</strong> Acting as an automated “definition of done” for every feature.</li><li><strong>Testing in Production-like Environments:</strong> Confirming seamless functionality in realistic conditions.</li><li><strong>Real-Time Feedback:</strong> Accelerating feedback loops to resolve issues quickly.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43954b401928" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ice Cream Cone — Anti Pattern]]></title>
            <link>https://medium.com/@maheshkhanna/ice-cream-cone-anti-pattern-5249669c5801?source=rss-2e6576ff5700------2</link>
            <guid isPermaLink="false">https://medium.com/p/5249669c5801</guid>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[test-automation]]></category>
            <category><![CDATA[test-automation-framework]]></category>
            <category><![CDATA[test-strategy]]></category>
            <category><![CDATA[software-test-automation]]></category>
            <dc:creator><![CDATA[Mahesh Khanna]]></dc:creator>
            <pubDate>Tue, 22 Oct 2024 17:12:04 GMT</pubDate>
            <atom:updated>2024-10-22T17:12:04.973Z</atom:updated>
            <content:encoded><![CDATA[<h3>Ice Cream Cone — Anti Pattern</h3><p><strong>Is your testing process still taking too long, even with automation?</strong></p><p><strong>Are you struggling to maintain your automated tests?</strong></p><p><strong>Is implementing CI/CD effectively becoming a challenge?</strong></p><p><strong>Is the overall testing cost too high?</strong></p><p>If you answered “yes” to these questions, you might be dealing with the Ice Cream Cone Anti-Pattern.</p><p>This anti-pattern occurs when your test suite consists of a minimal number of unit and integration tests, while heavily relying on manual and a large number of end-to-end automated tests. This imbalance leads to higher costs and longer testing times.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*lsA8yO5hjaOy4DkHU7UsFg.png" /></figure><p>As shown in the image, testing costs increase from the bottom to the top of the testing pyramid, where end-to-end tests are the most expensive.</p><p>To optimize your testing strategy, it’s better to adopt the <strong>Test Pyramid</strong> approach. This model emphasizes having a larger number of unit tests at the base, fewer integration tests in the middle, and the least amount of end-to-end tests at the top, resulting in faster feedback loops, reduced maintenance overhead, and lower costs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5249669c5801" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 Things That Waste Time & Money On A Software Project]]></title>
            <link>https://medium.com/@maheshkhanna/5-things-that-waste-time-money-on-a-software-project-7f3a9fb389ba?source=rss-2e6576ff5700------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f3a9fb389ba</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[manual-testing]]></category>
            <category><![CDATA[software-testing]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Mahesh Khanna]]></dc:creator>
            <pubDate>Sun, 06 Oct 2024 17:43:43 GMT</pubDate>
            <atom:updated>2024-10-06T17:47:41.477Z</atom:updated>
            <content:encoded><![CDATA[<p>Recently, I watched a video by Dave Farley titled “<strong>5 Things That Waste Time &amp; Money On A Software Project</strong>.” I wish I had known these insights earlier in my career because I have made most of the mistakes mentioned in the video. I would like to reflect on them here.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FPlN2UWOnzW0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DPlN2UWOnzW0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FPlN2UWOnzW0%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/9ac9c4b5b03c9bf1115b0b38a3d050be/href">https://medium.com/media/9ac9c4b5b03c9bf1115b0b38a3d050be/href</a></iframe><p>The five common mistakes are:</p><p>1. Not building what the user wants<br>2. Big teams<br>3. Delaying feedback/Working in large steps<br>4. Focusing on features over quality<br>5. Manual regression testing</p><p><strong>1. Not building what the user wants</strong><br>I’ve personally made this mistake. Not all our ideas are needed or valuable to users. In the past, I developed several applications with overly complex engineering, driven by the desire for recognition. However, these projects were eventually deprecated after considerable time, as they were difficult to maintain and didn’t align with user needs.</p><p><strong>2. Big teams:</strong><br>Smaller teams tend to be more productive than larger teams. Communication and collaboration are simpler in smaller teams, allowing for faster decision-making and reduced overhead.</p><p><strong>3. Delaying feedback/Working in large steps:</strong><br>Working in large steps, such as in the waterfall model, delays feedback on development progress. Quick feedback, like that achieved through agile methodologies, allows the product to evolve more efficiently and improves the chances of meeting user needs.</p><p><strong>4. Focusing on features over quality:</strong><br>Prioritizing features over quality can be a costly mistake. While features may initially attract customers, poor quality can quickly lead to the loss of business. It’s important to avoid accumulating technical debt and ensure a balance between delivering features and maintaining quality.</p><p><strong>5. Manual regression testing:</strong><br>Manual regression testing is a costly and inefficient approach. While humans are creative and excel at exploratory testing, regression testing is better suited for automation. Automated testing can save time and ensure consistency, freeing up testers for more valuable tasks like exploratory testing.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f3a9fb389ba" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Indirect output verification using wiremock]]></title>
            <link>https://medium.com/@maheshkhanna/indirect-output-verification-using-wiremock-535676993e3a?source=rss-2e6576ff5700------2</link>
            <guid isPermaLink="false">https://medium.com/p/535676993e3a</guid>
            <category><![CDATA[unittest]]></category>
            <category><![CDATA[wiremock]]></category>
            <category><![CDATA[automation-testing]]></category>
            <category><![CDATA[integration-testing]]></category>
            <category><![CDATA[testing-tools]]></category>
            <dc:creator><![CDATA[Mahesh Khanna]]></dc:creator>
            <pubDate>Fri, 23 Aug 2024 18:50:38 GMT</pubDate>
            <atom:updated>2024-08-23T18:50:38.855Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://medium.com/@maheshkhanna/verifying-indirect-outputs-using-test-doubles-b70a11496d8c">Previous article on indirect output</a></p><p><strong>Indirect output verification</strong> involves verifying that an application correctly interacts with external systems (such as making HTTP calls to an API) without relying on those systems being available during testing. This is where WireMock comes into play. WireMock allows you to mock external HTTP services and verify that your application makes the expected HTTP requests (the “indirect output”) during its operation.</p><h3>Scenario Example</h3><p>Let’s consider a scenario where your service processes user data and, as part of that processing, it sends a notification via an external API (a REST endpoint). The key is that this notification (the HTTP request) is an indirect output of the service’s operation.</p><pre>public void processUserData(String userId, String userData) {<br>        // Some processing logic (e.g., saving data to the database)<br>        <br>        // Indirect output: Notify external service<br>        String url = &quot;http://external-service/api/notify&quot;;<br>        restTemplate.postForEntity(url, userData, String.class);<br>    }</pre><p>Here, we are not directly testing the output of processUserData() (which might be void), but instead verifying that it correctly sends a notification to the external service.</p><p>The wiremock has a provision to retrieve details of requests logged in the journal matching the specified criteria.</p><p>We can either use the admin API to <a href="https://wiremock.org/docs/standalone/admin-api-reference/#tag/Requests/operation/findRequestsByCriteria">find requests by criteria</a> or the <a href="https://wiremock.org/docs/verifying/#verifying-in-java">method</a> provided to verify that a request matching some criteria was received by WireMock at least once:</p><pre>@Test<br>void testPostRequest() {<br>  <br>    userNotificationService.processUserData(&quot;123&quot;, &quot;{\&quot;id\&quot;:\&quot;123\&quot;,\&quot;name\&quot;:\&quot;John Doe\&quot;,\&quot;email\&quot;:\&quot;john.doe@example.com\&quot;}&quot;);<br><br>    // Assert: Verify that the POST request was made to the correct URL with the correct body<br>    verify(postRequestedFor(urlEqualTo(&quot;/api/notify&quot;))<br>            .withRequestBody(equalToJson(&quot;{\&quot;id\&quot;:\&quot;123\&quot;,\&quot;name\&quot;:\&quot;John Doe\&quot;,\&quot;email\&quot;:\&quot;john.doe@example.com\&quot;}&quot;)));<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=535676993e3a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>