分享

Designing Effective Test Cases

 hildaway 2012-09-18

Writing Test Cases: Part 4 “Designing Effective Test Cases: Benefits of Writing Effective Test Cases & Essential Design Elements of a Test Case”

In our earlier post, we made discussion on “major stakeholders in testing and misconceptions about testers as stakeholders”. Now we shall discuss about “how to design effective test cases, benefits of writing effective test cases & the essential design elements of the test case”. So let’s start with getting introduction of the topic then get into it as a whole.

Introduction

A test case is a detailed procedure that fully tests a feature or an aspect of a feature. Whereas the test plan describes what to test, a test case describes how to perform a particular test. We need to develop a test case for each test listed in the test plan.

Test cases have to be written by a capable tester who understands the application being tested, and each test case should be submitted for peer review.

Organizations take a variety of approaches to documenting test cases whereas these range from creating detailed steps to writing general descriptions. In detailed test cases, the steps describe exactly how to perform the test. In descriptive test cases, the tester decides at the time of the test how to perform the test and what data to use.

Usually testing companies prefer detailed test cases because determining pass/fail criteria is generally easier with this type of case. Moreover, detailed test cases are easy to reproduce than descriptive test cases. This is especially important when we plan to compare the results of the tests over time. Detailed test cases are more time-consuming to develop and maintain, but are easily reproducible.

Benefits of writing effective/successful test cases

Some of the major benefits are:

1. Successful test cases can improve the efficiency of executing tests.

2. Successful test cases can find bugs as many as possible.

3. Successful test cases can find bugs as early as possible.

4. Successful test cases are likely to catch bugs.

5. Successful test cases should not be redundant.

6. Successful test cases should not be too simple, &

7. Successful test cases should not be too complex.

Note: Test case is going to be complex when we have more than one expected results.


Test Case Design/Design Elements of a Test Case

A good test case is one that has a high probability to find an error. A test case should be furnished with the following design elements:

  • Test Case ID:

It is unique number given to test case in order to be identified.

  • Test description:

The explanation of test case we are going to test.

  • Revision history:

Each test case has to have its revision history in order to know when and by whom it is created or modified. In simple words revision history should have “the name of the creator/modifier and the date of creation and modification of a test case”.

  • Function to be tested:

The name of the function to be tested.

  • Environment:

It tells in which environment you are testing, e.g. it tells about the Operating System, Browser and Browser version used for testing.

  • Test Setup:

Anything you need to set up outside of your application for example printers, network and so on.

  • Test Execution:

It is detailed description of every step of execution.

  • Expected Results:

The description of what we expect the application to do.

  • Actual Results:

Pass / Failed

If pass – What actually happen when we run the test.

If failed – put in description of what we have observed.

  • Pre-Condition:

A condition that is a prerequisite for testing.

  • Post-Condition:

A set of criteria that should be true upon completion of the execution of a test case.

  • Module:

It is the name of the module under testing.

  • Testing Cycle:

It shows the number of times the testing cycle has run.

In our forthcoming post, we’ll cover concepts like when test cases should be written? Information objectives and tests intended to expose defects.

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约