Posts

Showing posts from June, 2025

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