Arunkumar Khannur's Software Testing Knowledge Center

11.12. Use Cases and Testing

11.12.1. Testing Need
Effective testing must include scenarios. Use cases can be valuable source of usage information and usage testing ideas.
The following information associated with a single scenario (i.e., complete path through a use case) is necessary (but not sufficient) to design a usage-based test:
  • Sequence of user actions and system actions in the scenario
  • Scenario pre, invariant, and post conditions
  • Alternative initial states of the domain entities (e.g. order) associated with the scenario
  • Alternative scenario trigger events
  • Alternative input to the scenario
  • Alternative Boolean values of the predicates determining the flow of the scenario
  • If use cases are specified informally or semi-formally, then high quality, usage-based test design remains a manual process and some of the information identified above will always be missing, unclear, or incorrect. Formally and precision are prerequisites for automating test design and for automatically verifying use cases as well. However there is lacking interest, skill, and commitment towards writing formal use cases with better precision.

11.12.2. Satisfying the Testing Need
Corresponding to Use Cases developed during requirements elicitation and functional specification, we can develop corresponding Usage Model. In addition to use cases, these models contain:
  • Application name and abstract
  • Population description – including population diagram and inter-actor profiles
  • Application domain description – including essential class descriptions, states, transition, rules, class relationships, domain invariants, and function limits
  • Definitions of derived attributes and conditions – optional
  • Dependencies between conditions – optional
  • Non-functional requirements – optional
  • Work breakdown structure – optional
  • Action contracts – optional

This additional information provides context for the textual use cases including background on the inter-actors involved as well as descriptions of the application entities, their relationships, their state changes, and their constraints. This additional information provides semantics for the conditions and actions in the use cases.

The twin goals that drove the design of Textual use cases were to maximize the understandability of the cases by application experts, not familiar with formal object-oriented concepts, and to supply sufficient information and structure to supply both manual and automated test design.
Khannur's Book
Arunkumar Khannur, Software Testing - Techniques and Applications, Published by Pearson Publications, 2011 (ISBN:978-81-317-5836-6; Pages:341 + xxii)
Follow Khannur
Khannur's Company
ISQT Process & Consulting Services Pvt. Ltd., Bangalore, INDIA
Khannur's Software Testing Forum
 Contact Khannur
ISQT Process & Consulting Services Pvt. Ltd.
#732, 1st Floor, 12th Main,
3rd Block, Rajajinagar,
Bangalore - 560010, INDIA
Phone: +91 80 23012511
Skype: arun.isqt