Skip to main content

Command Palette

Search for a command to run...

Types Of Testing we perform

Published
β€’7 min readβ€’View as Markdown

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 /login API returns 200 OK and 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

LoginTest.java

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);
    }
}

CheckoutTest.java

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.xml
    
  • Smoke 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 -Psmoke
    
  • Run Regression Suite:

      mvn clean test -Pregression
    

πŸ”Ή Benefits

  • No need to type -DsuiteXmlFile every time.

  • Cleaner and more Jenkins-friendly.

  • You can also add more profiles later (like api, e2e, performance).

More from this blog

Shreenibas Samal's blog

49 posts