Posts

Showing posts with the label Test Automation

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...

Top 10 Selenium Interview Questions and Answers for QA Engineers (2025 Update)

Image
1. What are the roles and responisibilities you have in your current project? In my current role as a QA Automation Engineer, I’m responsible for both automation and manual testing activities, with a strong focus on ensuring product quality throughout the development lifecycle.I actively participate in requirement grooming sessions to understand user stories and acceptance criteria. I also estimate testing efforts and prepare test plans in alignment with sprint goals. I write and maintain detailed test cases for both manual and automated testing. I develop and maintain automation scripts using Selenium WebDriver with Java, along with TestNG. I’ve implemented frameworks using Page Object Model, and integrated with tools like Maven, Git, and Jenkins for CI/CD. I collaborate with the DevOps team to integrate test suites with Jenkins pipelines for nightly builds and regression runs. I log detailed and reproducible bugs using JIRA, assign them to the respective team members,...

How Selenium Works for Web Automation

Image
Selenium is one of the most popular tools for web automation testing. It allows testers and developers to automate browsers for testing purposes or other repetitive tasks. To understand how Selenium works, we need to dive into its architecture and key components. What Is Selenium? Selenium is an open-source framework that automates web browsers. It supports multiple programming languages, including Java, Python, C#, and JavaScript, to write test scripts. Selenium is widely used for functional testing and supports all major browsers like Chrome, Firefox, Safari, Edge, and Internet Explorer. Selenium Components Selenium is not just a single tool; it’s a suite of tools designed to cater to different automation needs. Here are the core components: Selenium Component Details Selenium WebDriver Overview: Directly interacts with browsers via drivers to automate web applications. It supports multiple programming...