Posts

How to create cucumber BDD framework from scratch: Practical example

Image
In this post, I’ll walk you through the complete workflow of my Cucumber BDD Framework project, which I developed to automate test scenarios for the website Automation Practice . You can explore the full project here: GitHub Repository . 1. Project Overview This project is a hybrid automation framework based on Cucumber BDD using Java, Selenium WebDriver, and Maven . It supports Page Object Model (POM) , and integrates with Jenkins CI/CD and GitHub for version control. 2. Folder Structure 📋 Folder Summary Table Folder/File Purpose .vscode/ IDE-specific settings and preferences. .mvn/ Maven runtime configurations. src/main/java/com Core reusable framework classes. factory/ WebDriver setup and initialization. pages/ Page Object Model (POM) design classes. utilities/ Helper functions and utilities. src/test/java/ Step definitions, hooks, and test runners. resources/com Feature files and ...

The Ultimate Guide to Git & GitHub for QA Engineers

Image
As a QA Engineer, knowing Git (version control) and GitHub (remote repository hosting) is not optional anymore. Modern QA workflows – whether manual or automation – rely on Git for: Collaborating with developers & other testers Maintaining test automation frameworks Tracking changes in test scripts, data, and documentation Rolling back safely when bugs are introduced Tip for QAs: Treat your automation scripts, test cases, and configuration files just like code. Version control ensures no work is lost and every change is traceable. Git Basics Every QA Must Know Command What it does / Example git clone <repo-url> Download a remote repo locally. Example: git clone https://github.com/org/repo.git git status Check which files are staged, unstaged, or untracked. git add . Stage all changes for commit. Use carefully – better to stage specific files durin...

How to Use Page Object Model in Selenium with Java (Beginner Guide)

Image
The Page Object Model (POM) is a popular design pattern in Selenium WebDriver that helps make test code more readable, maintainable, and reusable. In POM, each web page in your application is represented by a separate class file. 🧠 Why Use Page Object Model? Code Reusability: Write the page structure once and reuse it in multiple test cases. Maintenance: If UI changes, only the page class needs to be updated. Readability: Tests are clean and easy to understand. 📁 Typical Project Structure src ├── main │ └── java │ └── pages │ └── LoginPage.java │ └── DashboardPage.java │ └── utils │ └── BaseTest.java ├── test │ └── java │ └── tests │ └── LoginTest.java 📝 Example Code 🔹 LoginPage.java public class LoginPage { WebDriver driver; @FindBy(id = "username") WebElement txtUsername; @FindBy(id = "password") WebElement txtPassword; @FindBy(id = ...

How to handle files in Java for QA Engineers

Image
As a QA Engineer, especially when dealing with automation using Java, it's essential to understand how file handling works. Whether it’s reading a test data file, logging test results, or writing reports — **basic file operations** are a part of real-time QA work. In this blog post, you will learn: - How to create , write , read , and delete a file in Java - How to read/write Excel files using Apache POI - Real-world QA scenarios where file handling is useful - Some practice questions to boost your understanding 📂 1. Creating a File in Java You can create a new file using the File class. import java.io.File; public class CreateFile { public static void main(String[] args) { try { File file = new File("testdata.txt"); if (file.createNewFile()) { System.out.println("File created: " + file.getName()); } else { System.out.println("File already exists."); } } catch (Exceptio...

Master CSS Selector in Selenium: The Ultimate Guide for Testers

Image
CSS Selectors are one of the most powerful ways to locate web elements in Selenium WebDriver. They are faster and more readable than XPath in many cases, and mastering them is essential for every QA Engineer working on web automation. Why this guide? This blog will help you understand everything about CSS Selectors in Selenium with examples, best practices, and how to handle real-time scenarios. 🔍 What is a CSS Selector? A CSS Selector is a pattern used to select HTML elements based on attributes like ID, class, type, name, etc. In Selenium, it is used with the By.cssSelector() method to locate elements. WebElement element = driver.findElement(By.cssSelector("input#username")); 📚 Basic CSS Selectors 1. ID Selector Use # followed by the ID value. input#email 2. Class Selector Use . followed by the class name. button.btn-primary 3. Tag Selector Selects elements by their tag name. input 4. Attribute Selector Selects elements with specific a...

Difference Between Smoke, Sanity & Regression Testing (With Examples)

Image
In software testing, terms like Smoke Testing , Sanity Testing , and Regression Testing are often used interchangeably, but they serve different purposes. Let’s dive into each type of testing with definitions, examples, and a clear comparison. What is Smoke Testing? Smoke Testing is a high-level test to check whether the major functionalities of an application are working after a new build or deployment. It’s often called a “Build Verification Test (BVT)” . Whenever a new build is received, some basic functionality of the application is verified. Purpose: To validate the stability of a build before proceeding to detailed testing. Performed on every new build release. To catch issue early on new build release. Example: Check if the application launches. Check if user login works. Check if main navigation is functional. Think of it as a basic health check before deeper diagnosis. What is Sanity Testing? San...

What is a Bug Life Cycle in Software Testing

Image
Bug: A software bug is an unexpected behavior of the system that the user or QA didn't anticipate or intend. The Bug Life Cycle (also known as the Defect Life Cycle) defines the journey of a defect from its initial discovery to its final closure. This process ensures that every bug is tracked, fixed, and verified systematically to maintain software quality. 🔁 Phases of Bug Life Cycle New: When a tester finds a new bug, it's marked as "New". It's waiting for review by the development team or project lead. Assigned: The bug is reviewed and assigned to a developer for fixing. Open: The developer has started working on the bug fix. Fixed: The developer has fixed the bug and the status is updated to "Fixed". Retest: The bug is sent back to the testing team for validation. Testers perform retesting to ensure the bug is really fixed. ...