Requirements and Specifications Software Testing and Verification Lecture

Requirements and Specifications Software Testing and Verification Lecture

Requirements and Specifications Software Testing and Verification Lecture 3 Prepared by Stephen M. Thebaut, Ph.D. University of Florida What are Requirements and Specifications? Requirement:

something required; something wanted or needed; an essential requisite... To Specify: to name; to state explicitly or in (sufficient) detail... Roles of Requirements in Testing and Verification How are requirements used in testing? Serve as basis for black-box test case design.

Source of expected results for ALL test cases. What do requirements have to do with the formal correctness assertions: {P} S {Q} ? f = [S] ? What if there are no requirements? Roles of Requirements in Testing and Verification

(contd) Bottom Line: testing and verification only make sense when requirements in some form are available to work with. Exercise Consider the following pseudocode program: Sum := 0 J := 1 while J<=N do Sum := Sum + X[J] J := J+1

end_while What does it do? Is it correct? Requirement/Specification Types Functional versus Non-Functional Formal versus Informal Structured versus Unstructured State-model based versus Operational Graphical versus Textual A Sampling of Requirement

Representations Natural language prose Numbered paragraphs (ala DoD standards) Functions, Attributes, and Constraints (ala Gause & Weinberg) Structured templates (of various sorts and levels) e.g., Volere shell, XP user stories Decision tables Pseudocode programs (contd) A Sampling of Requirement

Representations (contd) PDL models (PSL, RSL, etc.) Cause-Effect models State-Transition models Pre- and Post-conditions Recursive (intended) function definitions Algebraic specifications Z-based Schemas Etc. Exercise Identify each of the following requirements

representations: Sample.specs.pdf Requirements Sources at Different Levels Typical System-Level Sources Objectives document User manuals (e.g., MAN Pages) Installation documents Service manuals Requirements definition/specification

(contd) Requirements Sources at Different Levels (contd) Typical Unit-Level Sources Module/function/procedure specifications Pseudocode Logic specifications Object class/method specifications (contd)

Requirements Sources at Different Levels (contd) Typical Intermediate- (e.g., Product/ Component) Level Sources Product/component specification Functional specification Object use-include relations, sequence/collaboration diagrams, package specification (Some) Key Attributes

Completeness Consistency Unambiguousness Verifiability/Testability Correctness (?) Completeness Possible Definition for Functional Requirements: The desired response is specified for every possible stimulus and every system state.

Definition for Non-Functional Requirements: Constraints and preferences for every relevant attribute of every desired function are specified. Consistency Possible Definition: There are no contradictions or conflicts in any specified functional or non-functional requirements.

Unambiguousness Possible Definition: Requirements are not subject to multiple interpretations. Gause & Weinbergs heuristics for identifying potential ambiguity: Mary Had a Little Lamb (emphasize different words) Mary Conned the Trader (substitute synonyms) Mary had a little lamb

Heuristic Mary had a little lamb. Mary had a little lamb. Mary had a little lamb. Mary had a little lamb.

Mary had a little lamb. Mary conned the trader Heuristic Mary owned a petite lamb. Mary consumed a small amount of lamb. Mary had a little lamb.

Mary was involved with a young sheep. Mary conned the trader. Verifiability/Testability Possible Definition: Objective criteria exist for determining whether or not requirements will have been satisfied.

What about CORRECTNESS? The notion of a PROGRAM being correct (with respect to its requirements) is relatively straightforward, but what does it mean to say that a programs REQUIREMENTS are correct? (contd) What about CORRECTNESS? (contd)

Possible Definition: The REQUIREMENTS for a (sub-) program are correct if the PROGRAM DESIGN which incorporates those requirements is correct with respect to its requirements. Requirements for C A E B

C D F G H J

K Design for A I L What about CORRECTNESS? (contd) In other words, the correctness of a (requirements) specification would be considered with respect to a design that

incorporates that specification. For example, you might ask: Was the decision to take this course correct with respect to my overall plan of study? A self-imposed requirement. (contd) What about CORRECTNESS? (contd)

Based on our definition, the answer would be yes if your plan of study (a design that incorporates this course) satisfies your educational goals (i.e., the requirements for your plan). Role of testers in Requirements Engineering? What role can/should testers play in assessing/verifying the degree to which requirements are: complete,

consistent, unambiguous, verifiable, correct? Requirements and Specifications Software Testing and Verification Lecture 3 Prepared by Stephen M. Thebaut, Ph.D.

University of Florida

Recently Viewed Presentations

  • OWASP AppSec 2004 Presentation

    OWASP AppSec 2004 Presentation

    Nmap Mod Security (Ivan) Firebug Burp Proxy Nikto Httrack Tamperdata WebDeveloper ACEGI (for Spring Framework) Find bugs * Coming soon to a printer closer to you The Blob of Trust!!!!! * Results of 'Questions to OWASP Leaders' 1/2 A certifying...
  • Chapter 12: The Refraction of Light - Mr. Luth&#x27;s Website

    Chapter 12: The Refraction of Light - Mr. Luth's Website

    Chapter 12 The Refraction of Light Try This…. Refraction Refraction: Why is the straw bent? What Causes Refraction? Slide 8 The Speed of Light The Rules of Refraction Slide 11 Partial Reflection and Refraction Slide 13 ROY G BIV says:...
  • Poetry Terms - Humble Independent School District

    Poetry Terms - Humble Independent School District

    Poetry Terms 1. Alliteration - repetition of beginning consonant sounds 2.Ballad - a narrative poem, often of folk origin and intended to be sung 3. Cinquain - A type of poem that gets its name from the fact that it...
  • Social Facilitation and Homefield Advantage A2 PE Key

    Social Facilitation and Homefield Advantage A2 PE Key

    Social Facilitation and Homefield Advantage A2 PE Key Terms Dominant Response Proximity Theory Evaluation Apprehension Audience Increased Arousal (Drive Theory) Facilitation Inhibition Home Field Advantage SOCIAL FACILITATION AND THE EFFECTS OF AN AUDIENCE Think of a typical sporting situation and...
  • What you need to Know to Register Your Vehicle(s)

    What you need to Know to Register Your Vehicle(s)

    If the vehicle is shown to have a lien holder on your registration: Must posses a LIEN RELEASE from financial institution or CLEARED TITLE. Plates (If applicable i.e. non-op registration has no plates) & Registration 190-1A ***If joint owner only...
  • Cosmology - The Origin and Evolution of the Universe

    Cosmology - The Origin and Evolution of the Universe

    Chap 23: Cosmology - The Origin and Evolution of the Universe. Expanding Universe - consistent w/ a Big Bang? Olber'sParadox. Large Scale Structure and relation to Dark Matter. Evidence for the Big Bang. The Cosmic Microwave Background. The abundances of...
  • 48h x 30w poster template - Majmaah University

    48h x 30w poster template - Majmaah University

    Methods and Materials. Chart 3: Authorial Stance Mismatch in the Abstract Component Moves. The writers of the English abstracts seem to maintain the same rhetorical moves when translated into Arabic. However, in very few cases, they employ some component moves...
  • 9C: Minerals as Resources - WCA Online

    9C: Minerals as Resources - WCA Online

    2)Nonmetals Uses: Diamonds (C): Carat: Shows size of stone. (1ct=200mg) Used on drills/bits to cut hard materials. Sulfur: Sulfuric acid used in many industrial processes. Diamonds most often found in necks of volcanoes. Misconception: Organic: things made of Carbon, well...