Test Execution For Software Testing

Last Updated : 18 May, 2026

Test execution is the process of running test cases to verify that the application works as expected and meets business requirements. It is an important phase of the Software Testing Life Cycle (STLC) that ensures quality and correctness.

  • Ensures application meets requirements and works correctly.
  • Helps identify defects and improves overall quality.
  • Validates proper implementation of design and functionality.

Process of Test Execution

The process of test execution involves running test cases in a structured manner to verify that the application works as expected. It helps identify defects, validate results, and ensure the software meets requirements.

test_case_execution
Test Execution Process

Step 1: Define Test Objective

  • Identify the feature or functionality to be tested
  • Understand requirements and expected outcomes

Step 2: Test Case Design

  • Create test cases with clear steps and inputs
  • Define expected results for validation

Step 3: Test Execution

  • Execute test cases using defined test data
  • Follow steps as per the test plan

Step 4: Result Comparison

  • Compare actual results with expected results
  • Identify any mismatches or errors

Step 5: Defect Reporting

  • Log defects with proper details
  • Assign severity and priority

Step 6: Re-testing

  • Re-execute test cases after fixes
  • Ensure defects are resolved correctly

Step 7: Test Case Conclusion

  • Mark test case as Pass or Fail
  • Document final results and status

Example of an E-Commerce Website

Test cases specially designed for the login functionality of an e-commerce website:

Test Case 1: Valid Login

Verify that a user can successfully log in using valid credentials.

  • Test Case ID: TC_LOGIN_01
  • Precondition: User must be registered with valid credentials

Steps to Execute:

  1. Navigate to the login page
  2. Enter a valid username
  3. Enter a valid password
  4. Click on the Login button

Expected Result:

  • User is successfully authenticated
  • User is redirected to the homepage/dashboard

Actual Result:

  • User is redirected to the homepage
  • Status: Pass

Test Case 2: Invalid Login

Verify that the system displays an error message when invalid credentials are used.

  • Test Case ID: TC_LOGIN_02
  • Precondition: None

Steps to Execute:

  1. Navigate to the login page
  2. Enter an invalid username
  3. Enter an invalid password
  4. Click on the Login button

Expected Result:

  • System should display an appropriate error message (e.g., "Invalid username or password")
  • User should not be logged in

Actual Result:

  • Error message displayed
  • Status: Pass

Here, Selenium WebDriver and TestNG are used within a Java project to execute the test cases practically:

BaseTestMain.java (Base class for WebDriver setup and teardown)

Java
package automatedfunctional;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;

public class BaseTestMain {

    protected WebDriver driver;
    protected String url = "https://ecommerce.artoftesting.com/";

    // Configure and initialize ChromeDriver
    @BeforeMethod
    public void setUp() {

        // Set the path to the ChromeDriver executable
        System.setProperty(
                "webdriver.chrome.driver",
                "C:\\Users\\path of the chromedriver\\drivers\\chromedriver.exe"
        );

        // Initialize ChromeDriver
        driver = new ChromeDriver();

        // Maximize browser window
        driver.manage().window().maximize();
    }

    // Close the browser and end the WebDriver session
    @AfterMethod
    public void tearDown() {

        if (driver != null) {
            driver.quit();
        }
    }
}

LoginTest.java (Test Cases Execution)

Java
package automatedfunctional;

import org.testng.Assert;
import org.testng.annotations.Test;

public class LoginTest extends BaseTestMain {

    @Test
    public void testLoginWithValidCredentials() {

        // Step 1: Navigate to the login page
        driver.get(url);

        // Step 2: Create a LoginPage object
        LoginPage loginPage = new LoginPage(driver);

        // Step 3: Enter valid username and password
        loginPage.enterUsername("valid_user");
        loginPage.enterPassword("valid_password");

        // Step 4: Click the login button
        loginPage.clickLogin();

        // Step 5: Verify that login was successful
        Assert.assertTrue(
                loginPage.isLoginSuccessful(),
                "Login was not successful with valid credentials."
        );
    }

    @Test
    public void testLoginWithInvalidCredentials() {

        // Step 1: Navigate to the login page
        driver.get(url);

        // Step 2: Create a LoginPage object
        LoginPage loginPage = new LoginPage(driver);

        // Step 3: Enter invalid username and password
        loginPage.enterUsername("invalid_user");
        loginPage.enterPassword("wrong_password");

        // Step 4: Click the login button
        loginPage.clickLogin();

        // Step 5: Verify that login failed
        Assert.assertEquals(
                driver.getCurrentUrl(),
                "https://ecommerce.artoftesting.com/",
                "Unexpected URL after invalid login attempt."
        );
    }
}

Test Execution Summary

  • Test Case 1 (Valid Login): Passed successfully, and user is redirected to the homepage.
  • Test Case 2 (Invalid Credentials): Passed successfully, and error message is displayed.

Output:

output-of-Automated-Functional-Testing-
Output of test execution

Test execution was successful, confirming that the login functionality works correctly. All test cases passed for both valid and invalid scenarios, with any discrepancies noted for review.

Activities Under Execution

Activities under execution include the key tasks performed during testing to identify defects, validate fixes, and ensure software quality.

  • Defect Finding and Reporting: Identify bugs during testing and report them to developers.
  • Defect Mapping: Link defects with test cases and track their fixes.
  • Re-Testing: Re-run failed test cases to verify fixes.
  • Regression Testing: Ensure new changes do not affect existing features.
  • System Integration Testing: Test all modules together to validate system functionality.

Test Execution Priorities 

Test execution priorities refer to organizing and executing test cases based on their importance, risk, and impact. It ensures that critical and high-risk functionalities are tested first, improving efficiency and software quality.

  • Complexity: Test cases with higher complexity, multiple conditions, and critical logic should be executed first to avoid major issues.
  • Risk Covered: Test cases that involve higher risk, such as time-sensitive or resource-intensive scenarios, should be prioritized.
  • Platforms Covered: Test cases covering important platforms like Windows, Mac, and Mobile should be given priority.
  • Depth: Ensures that test cases deeply cover all possible conditions within a specific functionality or module.
  • Breadth: Ensures that test cases cover the entire application, including all functionalities and modules.

Test Execution States

Test execution states represent the outcome or status of test cases after execution. They help testers track progress and identify issues during testing.

  • Pass: Test case executed successfully and results match expected output.
  • Fail: Test case did not meet expected results.
  • Not Run: Test case has not been executed yet.
  • Partially Executed: Some steps passed while others failed.
  • Inconclusive: Execution completed but needs further analysis.
  • In Progress: Test case is currently being executed.
  • Unexpected Result: Test passed but produced unexpected output.

Test Execution Cycle 

The Test Execution Cycle represents the sequence of activities performed while executing test cases. It ensures proper validation, defect detection, and tracking of test results.

  • Step 1: Test Preparation: Review test cases, test data, and environment.
  • Step 2: Test Execution: Execute test cases as per the test plan.
  • Step 3: Result Validation: Compare actual results with expected results.
  • Step 4: Defect Logging: Report and track defects found during testing.
  • Step 5: Re-testing & Closure: Re-test after fixes and finalize results.

Test Execution Report 

A Test Execution Report is a document that provides a detailed summary of test execution activities and their outcomes. It helps stakeholders understand test progress, defects found, and the overall quality of the software.

  • Test Summary: Includes total test cases, executed, passed, failed, and pending test cases.
  • Defect Details: Provides information about defects, including severity, priority, and current status.
  • Execution Status: Shows progress of testing activities and completion percentage.
  • Environment & Observations: Details test environment and any important observations during testing.
  • Conclusion: Final evaluation of software quality and readiness for release.

Guidelines for Test Execution  

Test execution guidelines provide best practices to ensure effective and accurate testing. They help testers perform testing in a structured and efficient manner.

  • Follow Test Plan: Execute test cases as per defined plan and strategy.
  • Use Proper Test Data: Ensure correct and relevant data is used during testing.
  • Record Results Clearly: Document actual results and observations properly.
  • Report Defects Promptly: Log issues with complete details for quick resolution.
  • Re-test and Verify: Validate fixes and update test status accordingly.
Comment

Explore