Test Cases

Go back to Tutorial

A test case has components that describe input, action and an expected response, in order to determine if a feature of an application is working correctly.

A test case is a set of instructions on “HOW” to validate a particular test objective/target, which when followed will tell us if the expected behavior of the system is satisfied or not.

Writing effective cases is a skill. And you can learn it from experience and knowledge of the application under test.

Levels of the test writing process:

  • Level 1: In this level, you will write the basic cases from the available specification and user documentation.
  • Level 2: This is the practical stage in which writing cases depend on the actual functional and system flow of the application.
  • Level 3: This is the stage in which you will group some cases and write a test procedure. The test procedure is nothing but a group of small cases, maybe a maximum of 10.
  • Level 4: Automation of the project. This will minimize human interaction with the system and thus the QA can focus on the currently updated functionalities to test rather than remaining busy with Regression testing.

Writing Test Cases

Fields:

  • Test case id
  • Unit to test: What to be verified?
  • Assumptions
  • Test data: Variables and their values
  • Steps to be executed
  • Expected Result
  • Actual result
  • Pass/Fail
  • Comments

Basic Format of Test Case Statement

  • Verify
  • Using [tool name, tag name, dialog, etc]
  • With [conditions]
  • To [what is returned, shown, demonstrated]

Verify: Used as the first word of the test statement.

Using: To identify what is being tested. You can use ‘entering’ or ‘selecting’ here instead of using depending on the situation.

Example

For a Test Scenario: Check Login Functionality there many possible test cases are:

  • Test Case 1: Check results on entering valid User Id & Password
  • Test Case 2: Check results on entering Invalid User ID & Password
  • Test Case 3: Check response when a User ID is Empty & Login Button is pressed, and many more

Go back to Tutorial

Documentation Testing
Sample Test Case Template

Get industry recognized certification – Contact us

keyboard_arrow_up
Open chat
Need help?
Hello 👋
Can we help you?