software testing techniques(stt) compiled with reference from: software testing techniques: boris...

Download Software Testing Techniques(STT) Compiled with reference from: Software Testing Techniques: Boris Beizer Software Testing Techniques: Boris Beizer Craft

Post on 23-Dec-2015

241 views

Category:

Documents

0 download

Embed Size (px)

TRANSCRIPT

  • Slide 1
  • Software Testing Techniques(STT) Compiled with reference from: Software Testing Techniques: Boris Beizer Software Testing Techniques: Boris Beizer Craft of Software Testing: Brain Marrick Craft of Software Testing: Brain Marrick
  • Slide 2
  • SYNOPSIS MOTIVATIONAL OVERVIEW DECISION TABLES (HURL83, VESS86) PATH EXPRESSIONS AGAIN KV CHARTS SPECIFICATIONS TESTABILITY TIPS CONTENTS
  • Slide 3
  • Decision tables, which provide a useful basis for program and test design. Consistency and completeness can be analyzed by using boolean algebra, which can also be used as a basis for test design. Boolean algebra is trivialized by using karnaugh-veitch charts. SYNOPSIS
  • Slide 4
  • Logic is one of the most often used words in programmers vocabularies but one of their least used techniques. MOTIVATIONAL OVERVIEW 1. Programmers and Logic
  • Slide 5
  • Hardware logic test design, are intensely automated. Many test methods developed for hardware logic can be adapted to software logic testing. Hardware testing is ahead of software testing not because hardware testers are smarter than software testers but because hardware testing is easier. I say this from the perspective of a former hardware logic designer and tester who has worked in both camps and therefore has a basis for comparison. MOTIVATIONAL OVERVIEW 2.Hardware Logic Testing
  • Slide 6
  • As programming and test techniques have improved, the bugs have shifted closer to the process front end, to requirements and their specifications. Tools incorporate methods to simplify, transform, and check specifications, and the methods are to a large extent based on boolean algebra. MOTIVATIONAL OVERVIEW 3. Specification Systems and Languages (BERZ85, CHIU85, HAYE85, KEMM85, VESS86)
  • Slide 7
  • The knowledge-based system (also expert system, or artificial intelligence system) has become the programming construct of choice for many applications that were once considered very difficult (WATE86). Knowledge-based systems incorporate knowledge from a knowledge domain such as medicine, law, or civil engineering into a database. The processing is done by a program called the inference engine MOTIVATIONAL OVERVIEW 4. Knowledge-Based Systems
  • Slide 8
  • Programmed tools are nice to have, most of the benefits of boolean algebra can be reaped by wholly manual means if you have the right conceptual tool: the karnaugh-veitch diagram is that conceptual tool. MOTIVATIONAL OVERVIEW 5. Overview
  • Slide 9
  • Table 10.1 is a limited-entry decision table. It consists of four areas called the condition stub, the condition entry, the action stub, and the action entry. Table 10.1 Table 10.1. An Example of a Decision Table. 1a. Action 1 will take place if conditions 1 and 2 are met and if conditions 3 and 4 are not met (rule 1), or if conditions 1, 3, and 4 are met (rule 2). DECISION TABLES (HURL83, VESS86) 3.1. Definitions and Notation
  • Slide 10
  • Restating the conditions for action 1 to take place: 1b. Action 1 will be taken if predicates 1 and 2 are true and if predicates 3 and 4 are false (rule 1), or if predicates 1, 3, and 4 are true (rule 2). 2. Action 2 will be taken if the predicates are all false, (rule 3). 3. Action 3 will take place if predicate 1 is false and predicate 4 is true (rule 4). DECISION TABLES (HURL83, VESS86) 3.1. Definitions and Notation RULE 5RULE 6RULE 7RULE 8 CONDITION 11NOYES CONDITION 21YES1NO CONDITION 3YES1NO CONDITION 4NO YES1 DEFAULT ACTION YES
  • Slide 11
  • Decision tables can be automatically translated into code and, as such, are a higher-order language. The decision tables translator checks the source decision table for consistency and completeness and fills in any required default rules. The usual processing order in the resulting object code is, first, to examine rule 1. If the rule is satisfied, the corresponding action takes place. Otherwise, rule 2 is tried. This process continues until either a satisfied rule results in an action or no rule is satisfied and the default action is taken DECISION TABLES (HURL83, VESS86) 2. Decision-Table Processors
  • Slide 12
  • The use of a decision-table model to design tests is warranted when: 1. The specification is given as a decision table or can be easily converted into one. 2. The order in which the predicates are evaluated does not affect interpretation of the rules or the resulting action i.e., an arbitrary permutation of the predicate order will not, or should not, affect which action takes place. 3. The order in which the rules are evaluated does not affect the resulting actioni.e., an arbitrary permutation of rules will not, or should not, affect which action takes place. 4. Once a rule is satisfied and an action selected, no other rule need be examined. 5. If several actions can result from satisfying a rule, the order in which the actions are executed doesnt matter. DECISION TABLES (HURL83, VESS86).3. Decision Tables as a Basis for Test Case Design
  • Slide 13
  • Immaterial entries (I) cause most decision-table contradictions. If a conditions truth value is immaterial in a rule, satisfying the rule does not depend on the condition. It doesnt mean that the case is impossible. For example, DECISION TABLES (HURL83, VESS86) 4. Expansion of Immaterial Cases Rule 1:If the persons are male and over 30, then they shall receive a 15% raise. Rule 2:But if the persons are female, then they shall receive a 10% raise.
  • Slide 14
  • Table 10.4 is an example of an inconsistent specification in which the expansion of two rules yields a contradiction. Table 10.4 DECISION TABLES (HURL83, VESS86) 4. Expansion of Immaterial Cases
  • Slide 15
  • If there are k rules over n binary predicates, there are at least k cases to consider and at most 2 n cases. It is not usually possible to change the order in which the predicates are evaluated because that order is built into the program, * A tolerant implementation would allow these fields in any order. It is not usually possible to change the order in which the rules are evaluated because that order is built into the program, but if the implementation allows the rule evaluation order to be modified, test different orders for the rules by pairwise interchanges. Identify the places in the routine where rules are invoked or where the processors that evaluate the rules are called. Identify the places where actions are initiated. DECISION TABLES (HURL83, VESS86) 3.5. Test Case Design (GOOD75, LEWA76, TAIA87)
  • Slide 16
  • Decision tables can also be used to examine a programs structure DECISION TABLES (HURL83, VESS86) 6. Decision Tables and Structure
  • Slide 17
  • Figure 10.1. A Sample Program. DECISION TABLES (HURL83, VESS86) 6. Decision Tables and Structure
  • Slide 18
  • RULE 1RULE 2RULE 3RULE 4RULE 5RULE 6 DECISION TABLES (HURL83, VESS86) 6. Decision Tables and Structure CONDITION AYES NO CONDITION BYESNOYES111 CONDITION C111YESNO CONDITION DYES1NO1YESNO ACTION 1YES NO ACTION 2NO YES NO ACTION 3NO YES Table 10.5Table 10.5. The Decision Table Corresponding to Figure 10.1.Figure 10.1
  • Slide 19
  • R1RULE 2R3RULE 4R5R6 DECISION TABLES (HURL83, VESS86) 6. Decision Tables and Structure CONDITION A YYYYYYYYNNNNNN CONDITION BYYNNNNYYYYNNNYYN CONDITION CYNNNYYYNYYYYNN CONDITION D YYYNNYNNNYYNYYNN Table 10.6Table 10.6. The Expansion of Table 10.5.Table 10.5
  • Slide 20
  • Consider the following specification whose putative flowgraph is shown in Figure 10.2:Figure 10.2 1. If condition A is met, do process A1 no matter what other actions are taken or what other conditions are met. 2. If condition B is met, do process A2 no matter what other actions are taken or what other conditions are met. 3. If condition C is met, do process A3 no matter what other actions are taken or what other conditions are met. 4. If none of the conditions is met, then do processes A1, A2, and A3 5. When more than one process is done, process A1 must be done first, then A2, and then A3. The only permissible cases are: (A1), (A2), (A3), (A1,A3), (A2,A3) and (A1,A2,A3) DECISION TABLES (HURL83, VESS86) 6. Decision Tables and Structure
  • Slide 21
  • Figure 10.2. A Troublesome Program. DECISION TABLES (HURL83, VESS86) 6. Decision Tables and Structure
  • Slide 22
  • Logic-based testing is structural testing when its applied to structure PATH EXPRESSIONS AGAIN 1. General 1. The Model
  • Slide 23
  • A predicate is implemented as a process whose outcome is a truth-functional value. Dont restrict your notion of predicate to arithmetic relations such as >, >=, =,
  • 1. The wrong relational operator is used: e.g., > instead of X instead of A > Z. 4. The processing leading to the predicate (along the predicates interpretation path) is faulty. PATH EXPRESSIONS AGAIN 1.General 4. What Goes Wrong with Predicates
  • Slide 26
  • 1. Label each decision with an uppercase letter that represents the truth value of the predicate. The YES or TRUE branch is labeled with a letter and the NO or FALSE branch with the same letter overscored. 2. The truth value of a path is the product of the individual labels. Concatenation or products mean AND. 3. If two or more paths merge at a node, the fact is expressed by use of a plus sign (+) which means OR. PATH EXPRESSIO

Recommended

View more >