<?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"><channel><title><![CDATA[Untitled Publication]]></title><description><![CDATA[Untitled Publication]]></description><link>https://kaustavsingharoy.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Wed, 02 Sep 2026 04:45:48 GMT</lastBuildDate><atom:link href="https://kaustavsingharoy.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Blue Green Deployment — How It Works]]></title><description><![CDATA[Blue-green deployment is a deployment strategy that minimizes downtime and risk by maintaining two production environments — blue and green. In this article, we will explore how to implement blue-green deployment using GitLab, covering each step from...]]></description><link>https://kaustavsingharoy.hashnode.dev/blue-green-deployment-how-it-works</link><guid isPermaLink="true">https://kaustavsingharoy.hashnode.dev/blue-green-deployment-how-it-works</guid><category><![CDATA[software development]]></category><category><![CDATA[Software Engineering]]></category><category><![CDATA[Devops]]></category><category><![CDATA[deployment]]></category><dc:creator><![CDATA[Kaustav Singha Roy]]></dc:creator><pubDate>Sun, 24 Mar 2024 18:56:13 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/npxXWgQ33ZQ/upload/37110033e8402999d566cb42044d1349.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Blue-green deployment is a deployment strategy that minimizes downtime and risk by maintaining two production environments — blue and green. In this article, we will explore how to implement blue-green deployment using GitLab, covering each step from setup to rollback. How does it help –you are getting to test everything in a production like environment, not just in UAT and you can flip back and forth between two production environments to minimize down time.</p>
<p>How does it work — We need the following infrastructure in place:</p>
<ol>
<li><strong>GitLab Repository</strong> — you need something to store the code. We have chosen GitLab as the repository for this example.</li>
</ol>
<p><strong>2. CI/CD Pipeline</strong> — We will configure GitLab CI/CD pipeline to automate the build and deployment.</p>
<p><strong>3. Load Balancer</strong> — This is required to switch between the blue and green environments. We will use any open-source tool for this. We will be using NGINX as the Load Balancer which will direct traffic to the blue environment by default. This ensures that users continue to access the stable version while you deploy and test the new version in the green environment.</p>
<p>The IP addresses for blue and green environment will need to be updated in the NGINX configuration file. At the same time, your DNS settings need to point the domain to NGINX server’s IP address.</p>
<p><strong>4. Two Production Environments</strong> — Lastly, we need two environments which will be known as the blue and green environment.</p>
<h2 id="heading-here-is-a-flow-to-explain-how-it-works-in-detail"><strong>Here is a flow to explain how it works in detail:</strong></h2>
<p><img src="https://miro.medium.com/v2/resize:fit:1050/1*0p3DUu-bAeKg3eLv745fRw.png" alt="Kaustav Singha Roy" /></p>
<p>Stage 1 &amp; 2</p>
<p><strong>Stage 1</strong> — At this stage, the two environments are set up with same version of code. Either of them can be used for same experience but all user traffic is directed to Blue environment at this point as in the picture at the left.</p>
<p><strong>Stage 2</strong> — This is when a new deployment happens. We will release the new version 1.1 into the Green environment to ensure user experience is not disturbed. Load balancer will still continue to direct all traffic to Blue as in the picture at the right.</p>
<p>We can configure GitLab CI/CD pipeline to build, test, and deploy your application. Use the .gitlab-ci.yml file to define the pipeline stages and jobs. Normally, we have to define the deployment stages in this file like build, test, deploy etc. Every step will have its own jobs and scrips to execute related actions automatically.</p>
<p><img src="https://miro.medium.com/v2/resize:fit:1050/1*K65LdCm69Ly0fBmeRCSMdg.png" alt /></p>
<p>Stage 3 &amp; 4</p>
<p><strong>Stage 3</strong> — At this stage load balancer will start directing some of the user traffic to Green. This will serve the purpose of beta testing also and entire traffic can be quickly diverted to Blue in case there is any problem with the new release. In the picture for Stage 3, we can see 40% of users have been moved to Green environment while 60% of them are still in Blue environment.</p>
<p><strong>Stage 4</strong> — At this stage the Load Balancer has completely moved all users into Green environment which is working as the active production environment. Blue can continue to have release 1.0 even at this stage.</p>
<p><img src="https://miro.medium.com/v2/resize:fit:1050/1*MKKFCP8aPGioN_RnQsniKA.png" alt /></p>
<p>Stage 5 &amp; 6</p>
<p><strong>Stage 5</strong>- At this stage a new release comes along. Version 1.2 which also contains updates code base for the previous version 1.1 is deployed into Blue environment using CI/CD pipeline. All users still continue to be using Green environment.</p>
<p><strong>Stage 6</strong>- The load balancer once again starts directing users to the new production environment, which is Blue with the latest version 1.2. Eventually, 100% users move to Blue and the same cycle keeps repeating with every release.</p>
<h2 id="heading-benefits"><strong>Benefits</strong></h2>
<p>There are many benefits of using this blue green deployment strategy in this way.</p>
<p><strong>Zero Downtime:</strong> Blue-green deployment allows updates to be rolled out without causing any downtime for users. While one environment (let’s say “blue”) is serving live traffic, the other environment (green) can be updated or modified. Once the changes are made and the green environment is ready, traffic can be seamlessly switched from the blue to the green environment.</p>
<p><strong>Risk Reduction:</strong> By maintaining two identical environments, one serving live traffic and the other being updated, we are reducing the risk associated with deploying changes significantly. If any issues arise during deployment in the green environment, it can be easily rolled back by directing traffic back to the blue environment and vice versa. This rollback process can be performed quickly and with minimal impact on users.</p>
<p><strong>Testing in Production-Like Environment:</strong> Blue-green deployment allows for thorough testing of updates in a production-like environment before they are made live. Users can be gradually directed to allow for Beta testing. This ensures that any potential issues or bugs are identified and addressed before the changes are exposed to all users.</p>
<p><strong>Quick Rollback:</strong> If any issues are detected after deploying changes to the green environment, it’s straightforward to revert to the blue environment, which would still be running the previous stable version of the application. This rollback process can be automated as well in the CI/CD pipeline.</p>
<p>There are many ways to come up with a stable Blue Green environment set up. Some of the cloud providers like AWS come with sophisticated packages as well. Once integrated in the CI/CD pipeline this allows for automated and frequent deployments of updates to the application. Rolling deployments increase productivity of the team and also allow for quick fixes of bugs bringing in tremendous value to both quality and quantity of delivery.</p>
]]></content:encoded></item><item><title><![CDATA[A Study in Favour of Shift-Left Testing]]></title><description><![CDATA[The technology industry is evolving rapidly, necessitating agility and efficiency in development processes. Agile and Kanban practices have become instrumental in maintaining quality while accelerating delivery. A key paradigm shift in testing and QA...]]></description><link>https://kaustavsingharoy.hashnode.dev/a-study-in-favour-of-shift-left-testing</link><guid isPermaLink="true">https://kaustavsingharoy.hashnode.dev/a-study-in-favour-of-shift-left-testing</guid><category><![CDATA[software development]]></category><category><![CDATA[Software Engineering]]></category><category><![CDATA[Testing]]></category><category><![CDATA[Devops]]></category><category><![CDATA[technology]]></category><dc:creator><![CDATA[Kaustav Singha Roy]]></dc:creator><pubDate>Sat, 16 Mar 2024 19:20:40 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/flyaBC0TN-I/upload/31c4d3260cb3996d39d7be6d6511e42c.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The technology industry is evolving rapidly, necessitating agility and efficiency in development processes. Agile and Kanban practices have become instrumental in maintaining quality while accelerating delivery. A key paradigm shift in testing and QA approaches is the adoption of “Shift-Left” testing. This article explores the significance of Shift-Left testing, its divergence from traditional methods, the associated benefits and common applications.</p>
<p><strong>Difference with Traditional Testing:</strong> In traditional testing, the testing phase is positioned towards the “Right” of the software development life cycle (SDLC). This means that requirement understanding, test case creation, execution, and defect detection occur after development is complete. This approach poses risks, such as delays and missed project timelines due to late bug detection and increased rework. To address these issues, the Shift-Left approach moves many testing steps to earlier phases of the project. It promotes collaboration between developers and testers, fostering shared responsibility for quality.</p>
<p><strong>How Shift-Left Helps:</strong></p>
<ol>
<li><p><strong>Early Bug Detection:</strong> By testing early, Shift-Left testing catches defects in their early stages, reducing the risk of critical issues going unnoticed. This minimizes the cost and effort required for defect fixing, avoiding setbacks.</p>
</li>
<li><p><strong>Improved Communication and Collaboration:</strong> Continuous feedback from testers enhances code quality and increases efficiency. Testers gain a clear understanding of requirements from the beginning, resulting in better collaboration.</p>
</li>
<li><p><strong>Faster Time to Market:</strong> Shift-Left testing accelerates the development cycle by reducing rework, optimizing test cycles, and streamlining defect resolution. This enables organizations to gain a competitive edge by delivering software solutions faster.</p>
</li>
<li><p><strong>Test Driven Development (TDD):</strong> The Shift-Left approach aligns well with Agile continuous testing and TDD methodologies. Features are tested from the initial draft code and continuously throughout the development process. By the time formal testing begins, a significant portion of the testing steps has already been completed, reducing inefficiencies.</p>
</li>
</ol>
<p>In a Shift-Left approach, testing activities are not delayed until a dedicated testing phase. Instead, they occur concurrently with development. The following steps exemplify this approach:</p>
<ul>
<li><p>Requirements understanding from testers’ perspective</p>
</li>
<li><p>Test planning</p>
</li>
<li><p>Test design</p>
</li>
<li><p>Test environment setup</p>
</li>
<li><p>Code quality reviews</p>
</li>
<li><p>Partial test execution</p>
</li>
<li><p>Early defect identification and management</p>
</li>
</ul>
<p><strong>Types of Testing In-Scope</strong></p>
<p>While not all testing types can be executed before development is complete, the following can be shifted at least partially to the left.</p>
<ul>
<li><p><strong>Unit Testing:</strong> In Scope. Developers conduct unit testing during development once logical functionalities are complete.</p>
</li>
<li><p><strong>Integration Testing:</strong> In Scope. Testers can test the integration between various modules early and continuously.</p>
</li>
<li><p><strong>Regression Testing:</strong> In Scope. If regression test cases are automated, they can be executed during development, providing early feedback. Manual testing may have limited success in shifting regression testing to the left.</p>
</li>
<li><p><strong>Performance Testing:</strong> Partially in-scope. Proper performance testing requires complete deployment, making early results less accurate and beneficial.</p>
</li>
<li><p><strong>System Testing:</strong> Partially in-scope. By definition, system testing involves testing the software as a whole and is typically executed after development completion. However, preparatory steps, such as test creation, can occur earlier.</p>
</li>
<li><p><strong>Security Testing:</strong> Partially in-scope. Similar to performance testing, comprehensive security testing is advisable after development completion.</p>
</li>
</ul>
<p>Implementing the Shift-Left approach requires a cultural shift and additional training for testers. Despite the challenges, it offers significant advantages to Agile teams and organizations requiring rapid development and testing. While the concept of Shift-Left testing has existed for some time, it has gained additional traction in recent years, helping organizations stay competitive in the ever-evolving software development landscape.</p>
]]></content:encoded></item><item><title><![CDATA[Test Automation — Playwright vs Puppeteer]]></title><description><![CDATA[Puppeteer has been the go-to solution for many developers since its introduction in 2017 when it comes to browser based test automation, thanks to its robust features and user-friendly approach. However, in recent years Microsoft developed and releas...]]></description><link>https://kaustavsingharoy.hashnode.dev/test-automation-playwright-vs-puppeteer</link><guid isPermaLink="true">https://kaustavsingharoy.hashnode.dev/test-automation-playwright-vs-puppeteer</guid><category><![CDATA[software development]]></category><category><![CDATA[Testing]]></category><category><![CDATA[automation]]></category><category><![CDATA[Quality Assurance]]></category><category><![CDATA[software testing course]]></category><dc:creator><![CDATA[Kaustav Singha Roy]]></dc:creator><pubDate>Fri, 15 Dec 2023 16:59:20 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/5fNmWej4tAA/upload/a4d5e4f03e602c71f0c3120d730f1d7f.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Puppeteer has been the go-to solution for many developers since its introduction in 2017 when it comes to browser based test automation, thanks to its robust features and user-friendly approach. However, in recent years Microsoft developed and released Playwright, which aims to simplify browser automation and provide a more comprehensive solution for various testing scenarios.</p>
<p>In this article, I will compare Playwright and Puppeteer, highlighting their similarities, differences, strengths, and weaknesses. The goal is to equip you with the essential insights to make an informed decision on which tool best aligns with your project requirements and development needs.</p>
<h1 id="heading-overview-of-playwright-and-puppeteer"><strong>Overview of Playwright and Puppeteer</strong></h1>
<p>Playwright is an open-source Node.js library developed by Microsoft that enables developers to automate browser actions and interactions for testing and scraping purposes. It supports multiple browser engines, including Chromium, Firefox and WebKit, allowing for seamless cross-browser testing. Playwright provides an easy-to-use API and a robust set of features, making it a go-to choice for many developers.</p>
<p>On the other hand, Puppeteer is a Node.js library created by the Chrome team at Google. Like Playwright, Puppeteer is designed for automating browser actions and interactions, but it primarily focuses on the Chromium browser engine. Puppeteer boasts a user-friendly API and a strong feature set, making it a popular choice for web automation and testing tasks since the time it came out in 2017.</p>
<p><strong>Similarities</strong></p>
<p>Playwright is written and maintained by people who had earlier worked in Puppeteer and then moved to Microsoft so there are obvious similarities.</p>
<p>Both tools provide a comprehensive API for automating browser interactions, such as clicking buttons, filling out forms, and navigating pages. There is also headless browser support, allowing developers to run tests and automate tasks without the need for a visible browser window. Both tools can capture screenshots of web pages or generate PDF files, making it easy to save visual representations of a site’s content. In both Puppeteer and Playwright, developers can intercept and modify network requests and responses, providing greater control over the testing environment. Both allow execution of JavaScript within the context of the web page as well, enabling developers to interact with and modify the DOM as needed.  </p>
<p><strong>Differences Between Playwright and Puppeteer</strong></p>
<p>Despite their obvious similarities and similar goals, Playwright and Puppeteer have some key differences that set them apart:</p>
<p><strong>Browser Support:</strong> One of the most significant differences between the two tools is their browser support. Playwright provides out-of-the-box support for Chromium, Firefox, and WebKit, facilitating cross-browser testing. In contrast, Puppeteer primarily focuses on the Chromium browser engine, with limited support for Firefox and no native support for WebKit.</p>
<p><strong>Selector Engine:</strong> Playwright offers a more advanced selector engine compared to Puppeteer. It supports a variety of selector types, including CSS, XPath, and text-based selectors, while Puppeteer mainly relies on CSS and XPath selectors. This can make it easier to target specific elements on a web page with Playwright.</p>
<p><strong>Multiple Contexts and Pages:</strong> Playwright allows developers to work with multiple browser contexts and pages simultaneously, enabling more complex testing scenarios. Puppeteer, on the other hand, has limited support for managing multiple contexts and pages, making it more challenging to handle intricate test cases.</p>
<p><strong>Auto-Waiting Mechanism:</strong> Playwright features an advanced auto-waiting mechanism that automatically waits for elements to become available before performing actions. This can help to reduce the need for manual timeouts and improve the stability of tests. Puppeteer lacks this advanced auto-waiting functionality, requiring developers to rely more on manual timeouts and workarounds.  </p>
<p><strong>Accessibility Testing:</strong> Playwright has built-in support for accessibility testing, allowing developers to verify that their web applications meet accessibility standards. Puppeteer does not have native support for accessibility testing, requiring additional tools or libraries to perform such tests.  </p>
<p><strong>When to select Playwright:</strong></p>
<p>➕ You need to test across multiple browsers, as Playwright offers out-of-the-box support for Chromium, Firefox, and WebKit.<br />➕ You have complex testing scenarios that involve multiple browser contexts or pages, which Playwright handles more effectively.<br />➕ You prefer advanced element selection capabilities, as Playwright provides a versatile selector engine.<br />➕ You value stability and automatic waiting mechanisms, which are built into Playwright and help reduce flakiness in tests.<br />➕ Accessibility testing is a priority, as Playwright offers built-in support for this feature.</p>
<p><strong>When to Choose Puppeteer:</strong></p>
<p>Puppeteer might be the better solution if:</p>
<p>➕ You mainly target the Chromium browser engine and don’t require extensive cross-browser testing.<br />➕ You or your team have prior experience with Puppeteer or an existing codebase that leverages it, making it more efficient to continue using the tool.<br />➕ You have simpler test cases that don’t require managing multiple browser contexts or pages, which Puppeteer handles with some limitations.<br />➕ Your project relies on Chrome-specific features or APIs, as Puppeteer’s close integration with the Chromium browser engine ensures better compatibility and support.</p>
]]></content:encoded></item><item><title><![CDATA[TDD vs BDD vs ATDD vs DDD - Different Ways to Develop Software]]></title><description><![CDATA[Software development can happen in various ways. as long as end results are what we need. It is important to understand context and choose the methodology to align correctly and gain maximum benefits. Here are the few methods that are popular and can...]]></description><link>https://kaustavsingharoy.hashnode.dev/tdd-vs-bdd-vs-atdd-vs-ddd-different-ways-to-develop-software</link><guid isPermaLink="true">https://kaustavsingharoy.hashnode.dev/tdd-vs-bdd-vs-atdd-vs-ddd-different-ways-to-develop-software</guid><category><![CDATA[software development]]></category><category><![CDATA[Developer]]></category><category><![CDATA[software architecture]]></category><category><![CDATA[Testing]]></category><dc:creator><![CDATA[Kaustav Singha Roy]]></dc:creator><pubDate>Sun, 10 Dec 2023 10:47:22 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/uyfohHiTxho/upload/bdaf662405f4f52d09c84185aace479d.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Software development can happen in various ways. as long as end results are what we need. It is important to understand context and choose the methodology to align correctly and gain maximum benefits. Here are the few methods that are popular and can be helpful in specific situations:</p>
<h1 id="heading-test-driven-development-tdd"><strong>Test Driven Development (TDD)</strong></h1>
<p>This is perhaps the oldest of the method here and was developed in the late 1990s. This method puts testing at the core of development and everything else revolves around it.</p>
<p>Unit Testing is the driving force here. Rather than writing the code and then testing, first it is tested. This will obviously fail and then code will be written and tested again. This process will keep repeating till the test is successful.</p>
<p>Test cases are typically automated in same language as the implementation language.</p>
<p>The steps involve –</p>
<p>· Writing unit test cases in collaboration between developers and testers</p>
<p>· Executing test cases</p>
<p>· Coding to address issues</p>
<p>· Executing test cases again and so on..</p>
<p>· Testers can do integration tests once Unit test is successful.</p>
<h1 id="heading-behavior-driven-development-bdd"><strong>Behavior Driven Development (BDD)</strong></h1>
<p>This method started getting popular in the early 2000s and acceptance testing is the focus here. This is driven from the purpose of focusing on the expected behavior so that both technical and non-technical people are on the same ground. Typically implemented using many available tools in the market like Cucumber, Quantum, SpecFlow, JBehave etc.</p>
<p>Typically the test cases would be written in a language called Gherkin which follows a Given, When, Then format of specifying anything. Tests are written at scenario level and clearly maintained in feature files.</p>
<p>The end goal is to have a test case in natural language yet in a standard format. This can be understood and implemented by everyone working in the team and ensures end goal is met.</p>
<p>The steps involve -</p>
<p>· Identify the scenario for BDD</p>
<p>· Write the feature file in Given, When, Then format</p>
<p>· Run the feature file in appropriate language</p>
<p>· Check the test results of the run and fix the errors.</p>
<p>· Redo the process</p>
<h1 id="heading-acceptance-test-driven-development-atdd"><strong>Acceptance Test Driven Development (ATDD)</strong></h1>
<p>This also came into focus in the early 2000s. Acceptance testing is again the focus here as the name suggests but the purpose is clear capture of the requirements. This is also usually written in Gherkin and typically the tools used in BDD can be used here also. This brings customers to the testing table even before development has begun.</p>
<p>There are few situations where ATDD can do wonders. As the end goal is very clear to everyone, estimate are more accurate and collaboration improves in the team. It can help when technical debt is high in the project.</p>
<p>ATDD can be effective in reducing rework also due to clarity and save time. It reduces many problems Agile teams typically face.</p>
<p>The steps involve –</p>
<p>· Train the stakeholders on objectives and expectations</p>
<p>· Write the acceptance test cases</p>
<p>· Implement iterative learning</p>
<h1 id="heading-domain-driven-development-ddd"><strong>Domain Driven Development (DDD)</strong></h1>
<p>Understand the big picture and end goal. Once that is clear, decompose it into smaller deliveries and follow usual SDLC for the smaller pieces. This is the gist of domain driven development which came after all the other methods. This is not replacing any of the above methods but working in tandem with them to improve the process.</p>
<h1 id="heading-summary"><strong>Summary</strong></h1>
<p>So do these methods exist separately? Is it a choice to pick one of them or all together?</p>
<p>It depends on the project but for a reasonably big one, all of them can be used together. In fact for best results, it may be good to combine some of them together and not just pick one.</p>
<p>· Start with the big picture by doing DDD</p>
<p>· Once decomposed into smaller pieces, go with BDD or ATDD or both as required</p>
<p>· Once further decomposed into unit level, developers need to work with TDD</p>
<p>There may be training period for the team to get accustomed to this but once there, the development process can improve and reduce issues as well.</p>
]]></content:encoded></item></channel></rss>