Friday, August 12, 2005

Introduction to Test Case Writing



Test Case writing may be referred to the full process of case development from the decision to use a case to release of the case to its use in class. The entire sequence of steps of the process is set forth in Figure 1. However, the suggested activities for case writing that follow have been established to assist instructors or case writers in organizing and presenting information in the case format. The focus is on the writing process.


The Test Case Writing Process


Step 1: Case Origin

Identify the needs



Step 2: Establishing the needs

The search for a specific issue ideas and individuals or organizations that might supply the case information



Step 3: Initial Contact

The establishment of access to material on the case subject



Step 4: Data Collection

The gathering of the relevant information for the case



Step 5: The Writing Process

The organization and the presentation of the data and information



Step 6: Release

The obtaining of permission from the appropriate individuals to use the case for educational purposes.





Adopted from Leenders & Erskine (1989)



  1. A case should appear authentic and realistic. The case must develop the situation in real life terms. Reality must be brought into the case. Use as much factual information as possible. In the case, quotes, exhibits and pictures can be included to add realism and life to the case. The problem scenario in the case should be relevant to the real world so that students can experience and share the snapshot of reality.

  2. Use an efficient and basic case structure in writing. First, open up the case with the broadest questions, and then face the specific situation. Close with a full development of the specific issues. The presentation of a case should be primarily in a narrative style, which is a story-telling format that gives details about actions and persons involved in a problem situation.

  3. There must be a fit of the case with students’ educational needs, and the needs in practice. The topics and content of the case should be appropriate and important to the particular students in which the case is used. Moreover, case ideas should be relevant to the learning objectives

  4. A case should not propound theories, but rather pose complex, controversial issues. There are no simple or clearly bounded issues. The controversy of a case can entail debate or contest. It creates learning at many levels – not only substantive learning, but learning also with respect to communication and persuading others. The relationship between issues and the theories should be dealt with through the discussion or instruction.
  5. There should be sufficient background information to allow students to tackle the issue(s). Include not only the events that happened, but also how the people involved perceive them. There should be enough description in the prose of the case itself for students to be able to situate the case problem, understand the various issues that bear on the problem, and identify themselves with the decision-maker’s position. Also, good cases need descriptions of the people involved since understanding an individual’s predisposition, position, and values, is an important part of the decision making.

  6. Write the case in a well-organized structure and in clear language. A case should be easy to read or access. Make sure that you prepare an outline of the case and use it to organize your materials. Also ensure the clarity and refinement of your presentation of the case.

























Project Proposal
Business Need

Market Opportunity


Software Requirements Spec

Use Cases
Use Case Suite

Use Cases





Feature Specifications
Feature Set

Feature Specifications




Non-Functional Requirements



Environmental Requirements




Design
Structural Design

Behavioral Design

User Interface

Build System

Architecture

Persistence

Security


Target & Benefits
Target Market Segment

Claimed Customer Benefits


User Needs
Classes of Users

User Stories


Quality Assurance
QA Plan

Test Suite

Test Cases

Test Runs


Interview Notes
Requests from Customers


Use cases are a popular way to express software requirements. They are popular because they are practical. A use case bridges the gap between user needs and system functionality by directly stating the user intention and system response for each step in a particular interaction


Step One: Identify Classes of Users

The first step in writing use cases is understanding the users, their goals, and their key needs. Not all users are alike. Some users will expect to walk up to the system and accomplish one goal as quickly as possible.


Step Two: Outline the Use Case Suite

The second step in our breadth-first approach to writing use cases is to outline the use case suite. A use case suite is an organized table of contents for your use cases: it simply lists the names of all use cases that you intend to write. The suite can be organized several different ways. For example, you can list all the classes of users, and then list use cases under each.


Step Three: List Use Case Names

If you did step two, this step will be much easier to do well. Having an organized use case suite makes it easier to name use cases because the task is broken down into much smaller subtasks, each of which is more specific and concrete.


Step Four: Write Some Use Case Descriptions

In step three, you may have generated ten to fifty use case names on your first pass. That number will grow as you continue to formalize the software requirements specification. That level completeness of the specification is very desirable because it gives more guidance in design and implementation planning, it can lead to more realistic schedules and release scoping decisions, and it can reduce requirements changes later.


Step Five: Write Steps for Selected Use Cases

1) Enable users to achieve the key benefits claimed for your product

2) Determine a user's first impression of the product

3) Challenge the user's knowledge or abilities

4) Affect workflows that involve multiple users

5)Explain the usage of novel or difficult-to-use features


Each use case step has two parts: a user intention and system response:


  1. User Intention

    The user intention is a phrase describing what the user intends to do in that step. Typical steps involve accessing information, providing input, or initiating commands. Usually the user intent clearly implies a UI action. For example, if I intend to save a file, then I could probably press Control-S. However, "press Control-S" is not written in use cases. In general, you should try not to mention specific UI details: they are too low-level and may change later.

  2. System Response

    The system response is a phrase describing the user-visible part of the system's reaction to the user's action. As above, it is best not to mention specific details that may change later. For example, the system's response to the user saving a file might be "Report filename that was saved". The system response should not describe an internal action. For example, it may be true that the system will "Update database record", but unless that is something that the user can immediately see, it is not relevant to the use case.


Step Six: Evaluate Use Cases

An important goal of any requirements specification is to support validation of the requirements. There are two main ways to evaluate use cases:

  1. Potential customers and users can read the use cases and provide feedback.

  2. Software designers can review the use cases to find potential problems long before the system is implemented.


You can perform a more careful evaluation of your use cases and UI mockups with cognitive walk-throughs. In the cognitive walk-through method, you ask yourself these questions for each step:

  • Will the user realize that he/she should have the intention listed in this step?

  • Will the user notice the relevant UI affordance?

  • Will the user associate the intention with the affordance?

  • Does the system response clearly indicate that progress is being made toward the use case goal?


Use Case Writing Steps
1: Identify Functional Areas

2: Outline the Feature Set

3: List Feature Names

4: Write Some Feature Descriptions

5: Write Specs for Selected Features

6: Evaluate Features


Feature Spec Writing Steps

1: Identify Functional Areas

2: Outline the Feature Set

3: List Feature Names

4: Write Some Feature Descriptions

5: Write Specs for Selected Features

6: Evaluate Features



1 comment:

Anonymous said...

Good fill someone in on and this enter helped me alot in my college assignement. Thanks you on your information.