What is Test Case (TC), Examples with Free Template To Download

Test Case (TC) is the most important document prepared in testing activities. It is the base for testing an application. So make sure it is reviewed by all respective stakeholders before actual execution.

What is Test Case?

In simple words, the test case is a set of actions to take to verify if the function of the software application is working as expected.

TCs are designed and executed to find defects in the software application in the early stages. So the defects can be fixed and the quality of software application can be improved.

For this reason, preparing the test case as early as possible in the software development process is preferred.

Usually, testers write the test cases (except Unit Tests which are written and executed by developer). In a typical scenario when developers are developing a software application, testers are designing Test Scenarios, Test Cases and creating Test Data.

Once Development is completed, testers execute the TCs to test software applications.

Main Components of Test Case:

  • Test Case ID: the unique value to identify the TC or sometimes to determine the number of TCs.
  • Module Name: Module or Function Name which will be tested by TC.
  • TC Scenario: A functionality of module to test
  • Test Case Name: Unique name for TC to know what it verifies.
  • Pre-requisite: any special setup is needed to be done before running TC
  • Test Data: the data that needs to be prepared for testing
  • Test Steps: describe the steps to perform tests
  • Expected Results: expected results from the steps performed above
  • Actual Result: usually it will be pass or fail
  • Status: After execution, if TC is Pass / Failed or On Hold for some reason
  • Comments: This column is used to note related information when performing test cases.
  • Test Executed By: Name of the tester who executed the TC

Sample Test Application:

Let’s take a below Test Application

Test Application

And below is how we can write TCs for Test Scenario of ‘Login Functionality’

Test Case

You can download the Test Case Template here :

Some Sample TCs:

Here are some sample TCs we can think of  for Login Functionality:

  1. Check the case of only entering the [User ID] field but not the password
  2. Check the case of only entering the [Password] field but not the [User ID]
  3. Verify login function for correct input [User ID] and [Password]
  4. Check the login function in case of incorrect entry 3 times [User ID] and [Password]
  5. Check the [User ID]/ [Password] input for more than allowed characters
  6. Verify the case of entering special characters into [User ID]
  7. Check the input field [User ID] with leading spaces.
  8. Check the case of [Password] with leading spaces.
  9. Verify the data displayed in the Password textbox must be a star or dot
  10. Test if the OK button works as expected
  11. Verify if Cancel button works as expected
  12. Verify if Reset button works as expected

What is Test Script

In Automated Testing, testers write code/test scripts to automatically execute tests. Testers will use automation tools to build test scenarios and verify that the software works properly. The goal is to complete the test in a shorter time.

So test script is a set of instructions that will be performed on the application using an automation tool to verify if application functionalities work as expected.

Difference Between Test Cases & Test Scripts

Test Case is a term used in manual testing and a test script used in an automation Testing.

The only difference between these two concepts is, Test cases are written and executed manually, while Test Scripts are full script/code that QA/testers write to execute using a test automation tool.

Bonus Tips:

  • Understand the requirements thoroughly and write TCs covering positive scenarios AND negative scenarios for the complete coverage.
  • Always make sure you write test cases in such a way that you test only one thing at a time.
  • Also, write the TCs in such a way that can be reused for Regression testing or in the next releases.
  • Try to identify the Test Data while designing TCs.

I hope you found this document helpful! Please let us know if you have any queries. Happy to help!

Add a Comment

Your email address will not be published. Required fields are marked *