Home > Ask the Software Quality Experts > Software Requirements Questions & Answers > Meeting use case preconditions and postconditions
Ask The Software Quality Expert: Questions & Answers
EMAIL THIS

Meeting use case preconditions and postconditions

Karl E. Wiegers EXPERT RESPONSE FROM: Karl E. Wiegers

Pose a Question
Other Software Quality Categories
Meet all Software Quality Experts
Become an Expert for this site


Software quality news and advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


>
QUESTION POSED ON: 15 May 2007
I have a precondition that before starting use case 2, use case 1 should be completed. How do I write requirements with this condition?

>
EXPERT RESPONSE

There are several possible approaches. To leave it in use case terms, simply write a postcondition for use case 1 that will ensure that the corresponding precondition for use case 2 automatically will be satisfied when use case 1 has completed execution. Aligning preconditions and postconditions like this implies a specific sequence of use case execution.

From the perspective of functional requirements, you could write one or more functional requirements that test whether the precondition for use case 2 is satisfied. If the precondition is fulfilled, meaning that executing use case 1 left the system in the proper state, then the system can proceed with executing use case 2. If not, though, the system must take some other action since it isn't ready to proceed with use case 2 yet. The functional requirement isn't checking specifically to see if use case 1 has been properly completed. Instead, it is testing to see whether the necessary precondition for use case 2 has been fulfilled. From a practical point of view, there isn't any difference. But doing it this way means that the system doesn't need to "know" anything about use cases, just specific conditions that it can check.

Software requirements resources:
Use cases don't need to include all system functionality details

Software requirements analysis: Five use case traps to avoid

Software requirements gathering techniques

A third strategy is to take a test-driven approach. Here, you would write a test that sees whether the system proceeds as intended when that precondition for use case 2 has been fulfilled. A second test would verify that the system doesn't proceed with use case 2 if that precondition hasn't been satisfied because use case 1 has not yet executed successfully.

Any of these approaches will work. They're just different ways of thinking about the same situation. Aligning the use case postconditions and preconditions is a usage-centric approach. Specifying the functional requirements informs the developer of functionality that he or she must implement to make sure the system is ready to proceed with use case 2. And the tests provide a black-box way to verify that the implemented software is behaving properly.


Sound Off! -   Be the first to post a message to Sound Off!


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
Software Requirements
Requirements engineering in an uncooperative environment
Scrum and requirements gathering
Requirements reporting beyond use cases
Requirements gathering with storyboards
How to elicit performance requirements
Developing use cases that support business goals
Requirements discipline throughout the SDLC
The difference between gap analysis and requirements analysis
Software requirements elicitation and documentation
Requirements gathering for payroll application

Use cases and misuse cases
Requirements reporting beyond use cases
Test cases from requirements specifications and use cases
Approaches to defining requirements within Agile teams
Getting started with Web application misuse cases
Developing use cases that support business goals
Requirements gathering, SRS and use cases
How to effectively elicit user interface requirements
How to communicate with the client for effective requirements engineering
From use case diagrams to context diagrams
UML made Jacobson's use cases state of the art. What's next?

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
use case  (SearchSoftwareQuality.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice

About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2006 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts