Use case testing


Use case testing is a technique that helps us identify test cases that exercise the whole system on a transaction by transaction basis from start to finish. 

A use case is a description of a particular use of the system by an actor (a user of the system). Each use case describes the interactions the actor has with the system in order to achieve a specific task (or, at least, produce something of value to the user). 

Actors are generally people but they may also be other systems. Use cases are a sequence of steps that describe the interactions between the actor and the system. 

Use cases are defined in terms of the actor, not the system, describing what the actor does and what the actor sees rather than what inputs the system expects and what the system'outputs. 

They often use the language and terms of the business rather than technical terms, especially when the actor is a business user. They serve as the foundation for developing test cases mostly at the system and acceptance testing levels.

Use cases can uncover integration defects, that is, defects caused by the incorrect interaction between different components. Used in this way, the actor may be something that the system interfaces to such as a communication link or sub-system.


Use cases describe the process flows through a system based on its most likely use. This makes the test cases derived from use cases particularly good for finding defects in the real-world use of the system (i.e. the defects that the users are most likely to come across when first using the system). 

Each use case usually has a mainstream (or most likely) scenario and sometimes additional alternative branches (covering, for example, special cases or exceptional condi-tions). Each use case must specify any preconditions that need to be met for the use case to work. 

Use cases must also specify postconditions that are observable results and a description of the final state of the system after the use case has been executed successfully.

The PIN example that we used for state transition testing could also be defined in terms of use cases, as shown below. We show a success scenario and the extensions (which represent the ways in which the scenario could fail to be a success).


Partial Use case for PIN entry



For use case testing, we would have a test of the success scenario and one test for each extension. In this example, we may give extension 4b a higher priority than 4a from a security point of view.

System requirements can also be specified as a set of use cases. This approach can make it easier to involve the users in the requirements gathering and definition process.

Comments

  1. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here.
    software testing training in chennai

    ReplyDelete

Post a Comment

Popular posts from this blog

Types of Review

Phases of Formal Review

Structure Based or Whitebox Testing Techniques