Types Of Testing we perform
In Software Testing, there are many types depending on what we are testing, when we are testing, and how we are testing.
Hereβs a structured list for you (commonly asked in interviews):
πΉ 1. Based on Execution Method
Manual Testing β Tester executes test cases manually without tools.
Automation Testing β Test cases are executed using automation tools (Selenium, JUnit, TestNG, etc.).
πΉ 2. Based on Development Phase
Unit Testing β Testing individual modules/components.
Integration Testing β Testing the interaction between modules.
System Testing β Testing the complete integrated system.
Acceptance Testing (UAT) β Testing by end-users/business for requirements validation.
πΉ 3. Based on Purpose
Functional Testing β Validating application features (login, checkout, etc.).
Non-Functional Testing β Validating performance, scalability, security, etc.
πΉ 4. Types of Functional Testing
Smoke Testing
Sanity Testing
Regression Testing
Retesting
Exploratory Testing
Ad-hoc Testing
Boundary Value Analysis (BVA)
Equivalence Partitioning (EP)
πΉ 5. Types of Non-Functional Testing
Performance Testing
Load Testing
Stress Testing
Spike Testing
Endurance (Soak) Testing
Security Testing
Usability Testing
Compatibility Testing
Reliability Testing
Scalability Testing
πΉ 6. Based on Change
Regression Testing β After changes, ensure existing features still work.
Re-Testing β Re-executing failed test cases after fixes.
πΉ 7. Other Important Types
Alpha Testing β Internal team tests before release.
Beta Testing β Limited users test before public release.
A/B Testing β Compare two versions of software.
White Box Testing β Test internal code, logic.
Black Box Testing β Test only inputs/outputs, not internal code.
Grey Box Testing β Combination of both.
π In short, there are 50+ types of testing, but the most important for interviews are:
Unit, Integration, System, UAT
Smoke, Sanity, Regression, Retesting
Functional vs Non-functional
Performance, Load, Stress, Security
Alpha, Beta, Black Box, White Box
Do you want me to prepare a mindmap/cheat sheet diagram of all testing types for quick revision?
You said:
what are the automation suites are
ChatGPT said:
Great question π
When we talk about Automation Suites, it usually means collections of automated test cases grouped together based on purpose, execution priority, or type of testing.
Here are the main automation suites used in real projects and interviews:
πΉ 1. Smoke Suite (Build Verification Suite)
Contains basic critical test cases.
Runs after every new build deployment.
Ensures application is stable enough for further testing.
β Example: Login works, Homepage loads, DB connection is stable.
πΉ 2. Sanity Suite
Subset of regression but focuses on newly added/modified features.
Ensures new functionality works without affecting existing features.
β Example: New βAdd to Wishlistβ feature works fine.
πΉ 3. Regression Suite
Contains a broad set of test cases covering entire application.
Runs after code changes, bug fixes, or enhancements.
Ensures no old functionality is broken.
β Example: Login, Checkout, Payment, User Profile, Reports, etc.
πΉ 4. End-to-End (E2E) Suite
Covers full user journey across modules.
Simulates real-world workflows.
β Example: User Signup β Login β Add Product to Cart β Payment β Order Confirmation.
πΉ 5. Performance Suite
Automated performance test scripts.
Includes Load, Stress, Spike, Soak testing scenarios.
β Example: 1000 users login simultaneously.
πΉ 6. Security Suite
Automation focused on vulnerabilities & access control.
Uses tools like OWASP ZAP, Burp Suite, etc.
β Example: SQL Injection, XSS prevention, Broken Authentication.
πΉ 7. API Automation Suite
Collection of automated API test cases.
Validates response codes, schema, headers, payload, performance.
β Example: Verify/loginAPI returns200 OKand token is generated.
πΉ 8. Cross-Browser / Cross-Platform Suite
Runs scripts on different browsers (Chrome, Firefox, Edge, Safari) and devices.
Ensures application works everywhere.
β Example: Login page works on Chrome, Firefox, and Edge.
πΉ 9. Data-Driven Suite
Executes the same test cases with multiple sets of test data.
Uses Excel, CSV, DB, or JSON for input data.
β Example: Login test with 100 different username/password sets.
πΉ 10. Custom Business Suite
Suites designed as per business workflows/modules.
Example:
Sales Suite β Customer Onboarding, Invoice, Payment
Inventory Suite β Stock Entry, Update, Reports
β In real projects, the most common automation suites are:
- Smoke, Sanity, Regression, E2E, API
Do you want me to create a sample TestNG XML suite file (Smoke + Regression) so you can see how we organize suites in Selenium automation?
You said:
yes
ChatGPT said:
Perfect π Letβs create a sample TestNG suite file that contains both Smoke and Regression automation suites.
π Project Structure Example
src/test/java
βββ tests
β βββ LoginTest.java
β βββ HomePageTest.java
β βββ CheckoutTest.java
β βββ PaymentTest.java
β βββ ProfileTest.java
βββ testng.xml
β Sample Test Classes
import org.testng.Assert;
import org.testng.annotations.Test;
public class LoginTest {
@Test(groups = {"smoke", "regression"})
public void verifyValidLogin() {
System.out.println("Executing valid login test");
Assert.assertTrue(true);
}
@Test(groups = {"regression"})
public void verifyInvalidLogin() {
System.out.println("Executing invalid login test");
Assert.assertTrue(true);
}
}
import org.testng.Assert;
import org.testng.annotations.Test;
public class CheckoutTest {
@Test(groups = {"smoke", "regression"})
public void verifyAddToCart() {
System.out.println("Executing add to cart test");
Assert.assertTrue(true);
}
@Test(groups = {"regression"})
public void verifyCheckoutProcess() {
System.out.println("Executing checkout process test");
Assert.assertTrue(true);
}
}
β testng.xml Suite File
<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd" >
<suite name="Automation Test Suite" parallel="false">
<!-- Smoke Suite -->
<test name="Smoke Suite">
<groups>
<run>
<include name="smoke"/>
</run>
</groups>
<classes>
<class name="tests.LoginTest"/>
<class name="tests.CheckoutTest"/>
</classes>
</test>
<!-- Regression Suite -->
<test name="Regression Suite">
<groups>
<run>
<include name="regression"/>
</run>
</groups>
<classes>
<class name="tests.LoginTest"/>
<class name="tests.CheckoutTest"/>
<class name="tests.PaymentTest"/>
<class name="tests.ProfileTest"/>
</classes>
</test>
</suite>
πΉ How It Works
Run with:
mvn clean test -DsuiteXmlFile=testng.xmlSmoke Suite β Runs only critical tests (like
verifyValidLogin,verifyAddToCart).Regression Suite β Runs all regression-tagged tests across modules.
π Do you want me to also show you how to separate testng-smoke.xml and testng-regression.xml into two files (so Jenkins can run them individually)?
You said:
yes
ChatGPT said:
Great π separating testng-smoke.xml and testng-regression.xml is the most common practice in real automation frameworks, because Jenkins (or any CI/CD tool) can trigger them independently.
π Project Structure Example
src/test/java
βββ tests
β βββ LoginTest.java
β βββ HomePageTest.java
β βββ CheckoutTest.java
β βββ PaymentTest.java
β βββ ProfileTest.java
testng-smoke.xml
testng-regression.xml
β testng-smoke.xml (Smoke Suite)
<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd" >
<suite name="Smoke Test Suite" parallel="false">
<test name="Smoke Suite">
<groups>
<run>
<include name="smoke"/>
</run>
</groups>
<classes>
<class name="tests.LoginTest"/>
<class name="tests.CheckoutTest"/>
</classes>
</test>
</suite>
β testng-regression.xml (Regression Suite)
<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd" >
<suite name="Regression Test Suite" parallel="false">
<test name="Regression Suite">
<groups>
<run>
<include name="regression"/>
</run>
</groups>
<classes>
<class name="tests.LoginTest"/>
<class name="tests.CheckoutTest"/>
<class name="tests.PaymentTest"/>
<class name="tests.ProfileTest"/>
</classes>
</test>
</suite>
β Run Command in Maven
Run smoke suite:
mvn clean test -DsuiteXmlFile=testng-smoke.xml
Run regression suite:
mvn clean test -DsuiteXmlFile=testng-regression.xml
β Jenkins Integration (High-Level)
Create two Jenkins jobs (or pipelines):
Smoke Job β Runs
testng-smoke.xml(fast feedback after build).Regression Job β Runs
testng-regression.xml(nightly or before release).
π Do you want me to also prepare a Maven pom.xml profile setup so you can run smoke and regression with simple commands like:
mvn clean test -Psmoke
mvn clean test -Pregression
``` instead of always typing `-DsuiteXmlFile`?
You said:
yes
ChatGPT said:
Perfect π Using Maven profiles is a neat way to avoid typing -DsuiteXmlFile every time. Weβll configure profiles for Smoke and Regression in the pom.xml.
β
pom.xml with Profiles for TestNG Suites
Hereβs a sample snippet you can add to your pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.demo</groupId>
<artifactId>selenium-framework</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<dependencies>
<!-- Selenium -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.23.0</version>
</dependency>
<!-- TestNG -->
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.10.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Surefire Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.5</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>${suiteXmlFile}</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
</plugins>
</build>
<!-- Profiles -->
<profiles>
<!-- Smoke Profile -->
<profile>
<id>smoke</id>
<properties>
<suiteXmlFile>testng-smoke.xml</suiteXmlFile>
</properties>
</profile>
<!-- Regression Profile -->
<profile>
<id>regression</id>
<properties>
<suiteXmlFile>testng-regression.xml</suiteXmlFile>
</properties>
</profile>
</profiles>
</project>
β Run Commands
Run Smoke Suite:
mvn clean test -PsmokeRun Regression Suite:
mvn clean test -Pregression
πΉ Benefits
No need to type
-DsuiteXmlFileevery time.Cleaner and more Jenkins-friendly.
You can also add more profiles later (like
api,e2e,performance).