Test Plan vs Test Case: Core Differences
January 20, 2023
Test plan and Test case are often thrown interchangeably. It is crucial to understand the core difference between a test plan and a test case. This guide explains this in detail.
Software Test Lifecycle (STLC) refers to the testing process that has specific steps to be executed in a definite sequence to ensure that the quality goals have been met.
The software test lifecycle has different phases and each phase has different goals and deliverables, in which two essential components are the Test plan and Test cases.
Once business requirements are gathered and converted to System Requirement Specifications (SRS), it gives more clarity and understanding of the requirements to prepare test plans and to identify test scenarios to prepare test cases.
What is a Test Plan?
Test plan is a document that describes the scope, approach, resources, and schedule of intended test activities. It identifies amongst others test items, the features to be tested, the testing tasks, who will do each task, the degree of tester independence, the test environment, the test design techniques, and entry and exit criteria to be used, and the rationale for their choice, and any risks requiring contingency planning. It is a record of the test planning process.
A test plan’s importance is capturing and sharing the testing details with all stakeholders. It also undergoes a review and approval process.
Follow-Up Read: 7 Software Test Estimation Techniques
How to Create a Test Plan: Example
Let us look at a sample Test Plan for ‘creating a website bstackdemo.com’
- Overview
Create a website bstackdemo.com with functionality to allow the users to log in with Google credentials or to sign up new users with email and password.
- Scope
In scope:
- Sign in with the Google option
- Sign in with email and password
- Sign up link
Out of scope: All other features that are not included under in scope
- Test Approach
Functional Testing: Testing the functionality against Software requirement specifications to check what software does. For example: Smoke testing, System testing, Integration testing, Interface testing, Sanity testing, Regression testing, and User acceptance testing.
Non-Functional Testing: Testing the way and how well the software works. For example: Performance testing, Load testing, Security testing, Stress testing, upgrade, installation testing, and Recovery testing.
- Test Entry and Exit Criteria
Entry criteria define prerequisites that must be completed before commencing testing
- Requirements must be defined and approved
- Test plan must be approved
- Test cases must be prepared, reviewed, and approved
- Test Data must be available
- Test environment must be open with testable code
- Unit test results must be shared by the development team (optional)
Exit criteria define the items that must be completed before concluding the testing
- All critical test cases must be executed and passed
- Achieving 100% Test coverage for all the requirements in the scope
- Retesting and closing all the blockers, Critical and Severity-1 defects
- Test summary report preparation and approval by stakeholders
- Risks and Mitigation Plans
A risk is a potential problem that has not happened yet or may not happen at all. Anticipating the possible negative outcome and a plan to avoid or mitigate is captured in this section
- Defect Management
Defect Management involves defining stages of the defect life cycle to be followed in the project. It defines and implements the defect life cycle
For Example,
New > Open > Review > In development > Ready for test > Test in progress > Test successful > Done.
New > Open > Review > In development > Ready for test > Retest failed > Review > In development > Ready for test > Test in progress > Test successful > Done.
New > Open > Review > Deferred.
New > Open > Review > Not a defect.
New > Open > Review > Defect not reproducible.
- Test Environment
Defines the environment configuration in which the application will be tested.
For Example, Operating system, Browsers, Versions, etc.
- Test Schedule
Defines the timelines for each test activity.
For Example, Start and end date for Test plan preparation, Test cases preparation, Test execution, and publishing test summary.
- Test Deliverables
Defines the artifacts delivered as part of test closure
For Example, Test summary report, Test cases, Test results, etc.
- Reports
Define any stats published during the test life cycle.
For Example, Daily status reports to stakeholders, Weekly progress reports, Test summary reports, etc.
- Stakeholders contacts
List all the project’s stakeholder names and contact details like email id and phone numbers.
- Roles and responsibilities
List the project team members’ names and their roles in the project execution.
- Sign off
This section includes the stakeholders responsible for signing off the project and their sign-off details.
Best Practices to Create a Test Plan
- Invest quality time in understanding Requirements and clarifying all the questions and assumptions
- Defining test objective
- Defining test criteria
- Planning test environment
- Forecasting risks and planning mitigation
- Resource planning
- Schedule and estimation
What is a Test Case?
ISTQB defines a test case as a set of preconditions, inputs, actions (where applicable), expected results, and post-conditions, developed based on test conditions.
Test cases are step-by-step instructions to the tester to perform validation of specific aspects of the system or application functionality.
Read More: Test Case Prioritization: A Detailed Guide
How to create a Test Case using a simple example
An example Test Case for the optimistic scenario for existing user login to www.browserstack.com
Try Testing on Real Device Cloud
Best Practices to Create Quality Test Cases
Test Cases are fundamental to the Testing process. Hence it is important to:
- Write a simple and clear description
- Write reusable test cases
- Keep test cases IDs unique
- Test cases should clearly describe defined requirements
- Clearly specify expected results and any assumptions made
- Review with peers and stakeholders
Test Plan vs Test Case: Key Differences
Listed below are the key differences between Test Plan and Test Case
Attribute | Test Plan | Test Case |
---|---|---|
Definition | The Detailed document which contains objective, test strategy, schedule, estimates, timelines and resources required for completing the project. | A set of actions with details required to be performed on a system to verify its functionality or behavior is as per the requirement. |
General | A detailed document covers management aspects and Testing aspects in the project | A specific and precise document for a distinctive testing feature that covers only testing aspects |
Intended for | Testers, Test managers and any Stakeholders need to be updated about the testing process | Test team |
Duration | Till the end of completion of the testing project | Till the end of a particular testing process |
Sections | Both testing and project managing aspects like scope, schedule, risks, approach, entry & exit criteria, defect reporting, roles & responsibilities and more | Only testing aspects such as test case name, test steps, test data, test environment, expected test result, actual test result, test status, etc |
Uses |
|
|