Test Case Writing Process and Test Data Generation

Test Case Writing Process and Test Data Generation

Let's start with; What is Test Data?

This is documented Data that is basically used to test the software program.

Test Data is divided into 2 sub categories

Positive Data - data which is generally given to the system to generate expected results.

Negative Data - data which is used to test exceptional, unexpected and extreme conditions.


Example to test the following code - 'z=x+y'.

Positive data: x = 3, y = 4

Negative Data: x = -9, y = 0.000000000004

Guidelines for Test Data creation

Certain guidelines are followed worldwide for test data generation. It is important to follow these guidelines in order to test the complete product functionality:

1. No data: Run your Test Cases on blank or default data. See if proper error messages are generated.

2. Valid data set: Create it to check if the application is functioning as per requirements and valid input data is properly saved in database or files.

3. Invalid data set: Prepare invalid data set to check application behaviour for negative values, alphanumeric string inputs.

4. Illegal data format: Make one data set of illegal data format. The system should not accept data in invalid or illegal format. Also, check proper error messages are generated.

5. Boundary Condition dataset: Dataset containing out of range data. Identify application boundary cases and prepare a data set that will cover lower as well as upper boundary conditions.

6. The dataset for performance, load and stress testing: This data set should be large in volume. This way, creating separate datasets for each Test Condition will ensure complete test coverage.


4 Levels of Test Case Writing

  1. In the first level, basic Test Cases based upon information provided in user documentation and specification sheets are written.
  2. In the second level, Test Cases based upon the functional and system of the software/application are written.
  3. In the third level, small Test Cases are added to create a single Test Case that covers all of them.
  4. In the fourth level, the project is automated and focuses on testing the updated functionalities and regression testing.


Important factors involved in writing Test Cases

  • Whenever requirements alter or changes, Test Cases should be revised and updated accordingly
  • Test Cases can be distributed among the testers as they will be assigned some categories
  • A single Test Case may contribute to several Test Conditions and a single Test Condition may consist of multiple Test Cases
  • Test Cases can be interdependent on each other, and this tendency is more visible when checked for medium to large applications with a bit of complex logic
  • Test Cases are distributed among the developers as they are directly used by them in order to build their logic and cover all the required scenarios

How to write Test Cases?

  • Test Cases should be kept neither too simple nor too complex
  • After the proper documentation of the Test Cases, review it from the Tester’s point of view
  • Let the testers decide the test data item values but never let them choose the test data items by themselves
  • As a QA member, try not to hesitate while giving any suggestion if it can improve something
  • Never forget the end user at any stage of Test Cases writing

要查看或添加评论,请登录

Jennifer Ugo的更多文章

  • Solutions and Innovations with AI

    Solutions and Innovations with AI

    As we all know or should all know, Artificial Intelligence (AI) is the most promising development for the future. I'm…

  • Performance Testing using JMeter

    Performance Testing using JMeter

    Apache JMeter is an open source tool which analyzes and measure the performance of certain services, focuses mainly on…

    3 条评论
  • Performance Testing

    Performance Testing

    Performance Testing ensures that the software applications performs well under their expected workload. The goal of…

  • Non-functional Testing

    Non-functional Testing

    Basically, Non-Functional Testing is done to check and evaluate all the non-functional parameters which are not covered…

  • Software Test Environments

    Software Test Environments

    What is a Test Environment? Test Environment is basically a replica of actual production environment which is provided…

  • Software Testing: Bug Reporting

    Software Testing: Bug Reporting

    In software, a bug is an error, flaw, or fault in an application. This error causes the application to produce an…

  • Some Test Management Tools

    Some Test Management Tools

    Yesterday we talked about some Important Fields for Test Case Document. Here's a couple of tools we we can use for…

  • Test Management

    Test Management

    Test Management Process is basically a set of activities which covers the whole testing phase i.e.

  • Some Important Fields for Test Case Document: Explained

    Some Important Fields for Test Case Document: Explained

    While creating a Test Sheet or a Test Case, there are some important fields that must be added during the preparation:…

  • Software Test Estimation

    Software Test Estimation

    What do you understand about Software Test Estimation? Estimating test efforts is one of the most critical tasks in the…

社区洞察

其他会员也浏览了