CSE 270: Software Testing - Reading Material

2.3 Test Planning

Test plans and test cases form the basis of modern quality assurance. Together these items detail the items to be tested and what the expected outcomes are.These elements work together to ensure the reliability, functionality, and performance of software applications.

What is a test plan?

A test plan is a comprehensive document that outlines the testing strategy, objectives, scope, resources, and schedule for a software project. It serves as a roadmap that guides testing activities from start to finish. A well-constructed test plan not only provides clarity to the testing team but also aligns stakeholders' expectations with the testing process.

Key Components of a Test Plan

What is a test case?

Test cases are detailed scenarios that describe how the software should behave under specific conditions. They outline inputs, expected outcomes, and the sequence of steps required to execute the test. Test cases are designed to validate that the software functions as intended and meets its requirements.

Key Elements of Test Cases

Test Case Example

Test Case ID: TC001

Objective: Verify that the user registration form functions correctly by allowing a new user to successfully register.

Preconditions:

  1. The application is accessible and functional.
  2. The user is on the registration page.
  3. The user has a valid email address and password for registration.

Steps:

  1. Navigate to the user registration page.
  2. Enter a valid email address in the designated field.
  3. Enter a secure password in the password field.
  4. Confirm the password in the designated confirmation field.
  5. Provide additional required information (for example, name, date of birth).
  6. Click the Register button to submit the registration form.

Results

Pass/Fail Criteria

Test Case Types

When creating test cases there are many different types to consider. A good test plan incorporates many of these different kinds of tests.

Your test plan will include as many of these different types of test cases as required to fully test your application.

Characteristics of a Good Test Case

Writing a good test case can be challenging. There are several things to keep in mind as you generate your test. Below are considerations when generating your test cases.

Generating Test Cases from Acceptance Criteria

Acceptance criteria play an important role in defining the conditions that must be met for a user story or feature to be considered complete. When creating test cases, the acceptance criteria serve as the foundation for designing tests that validate whether the functionality meets the specified requirements.

Here's a step-by-step guide on how to use acceptance criteria to generate effective test cases:

By following this systematic approach, testers can leverage acceptance criteria to create a comprehensive suite of test cases that cover all aspects of the specified requirements. This process contributes to effective testing, ensuring that the software aligns with user expectations and functional specifications.