Home
Decision Table-Based Testing Decision Tables
Contents
1. 4 New Equivalence Classes Mi month month has 30 days M2 month month has 31 days M3 month month is December M4 month month is February Di day 1 lt day lt 27 D2 day day 28 D3 day day 29 D4 day day 30 D5 day day 31 Y1 year year is a leap year Y2 year year is a common year 4 NextDate DT 3rd try part 1 month in day in year in Impossible Increment day Reset day Increment month Reset month Increment year Test Case Design a To identify test cases with decision tables we interpret conditions as inputs and actions as outputs Sometimes conditions end up referring to equivalence classes of inputs and actions refer to major functional processing portions of the item being tested a The rules are then interpreted as test cases 15 4 NextDate DT 3rd try part 2 C1 month in M3 M3 M3 M3 M3 M4 M4 M4 M4 M4 M4 M4 C2 day in Di D2 D3 D4 D5 D1 D2 D2 D3 D3 D4 D5 C3 year in Y1 Y2 Y1 Y2 A1 Impossible xX X xX A2 Increment day xX XxX x X x X A3 Reset day X xX X A4 Increment month xX X A5 Reset month X A6 Increment year X 14 4 Applicability The restrictions do not in
2. 4 Variable Negation Strategy An approach that can help with the scaling problems of decision table based testing Applicable when the system under test can be represented as a truth table binary input and output Designed to select a small subset of the 2N test cases 21 4 Deriving the Logic Function Review boolean algebra AB A and B A B AorB a wA not A a A logic function maps n boolean input variables to a boolean output variable A truth table is an enumeration of all possible input and output values 23 Guidelines and Observations Decision tables do not scale up very well May need to a Use extended entry decision tables a Algebraically simplify tables Decision tables can be iteratively refined The first attempt may be far from satisfactory 20 Example truth table Variant Normal Pressure Call For Heat Damper Shut Manual Mode Ignition Enable Number A D BlelRlH Hlo Hlolo elololo ololo n 4 Logic function a The logic function for the example is Z AB C AD a Several techniques to derive it a Karnaugh maps Cause effect graphs a A compact logic function will produce more powerful test cases 24 Variable Negation Strategy Designed to reveal faults that hide in a don t care The test suite contains Unique true points A variant per te
3. D ecision Table Based Testing _ Chapter 7 Decision Table Terminology Cl a lt b c C2 b lt a c C3 c lt a b c4 a b C5 a c C6 A a b c Not a Triangle ajala ala ajaaa afna aT bet Bal ia Eal Em ajajajaja ajajajaja ajnjnjajal a njnjnjaja a A NX Scalene A w Isosceles A4 Equilateral A a Impossible Decision Tables Wikipedia a A precise yet compact way to model complicated logic a Associate conditions with actions to perform a Can associate many independent conditions with several actions in an elegant way 4 Printer Troubleshooting DT Printer does not print yiylyly nuJninudn Conditions A red light is flashing YIYININIY Y NIN Printer is unrecognized TNC NEN Heck the power cable x Check the printer computer cable x x Actions Ensure printer software is installed x x x x Check replace ink x X x x Check for paper jam x x Let s try this for the Triangle problem 4 4 Triangle Test Cases Case ID Expected Output DT1 Not a Triangle DT2 Not a Triangle DT3 Not a Triangle Equilateral Isosceles Isosceles Isosceles Scalene NextDate Decision Table a The NextDate pr
4. oblem illustrates the problem of dependencies in the input domain a Decision tables can highlight such dependencies Impossible dates can be clearly marked as a separate action Let s try it NextDate DT ist try partial C1 month in M1 C2 month in M2 C3 month in M3 C4 day in D1 C5 day in D2 C6 day in D3 C7 day in D4 C8 year in Y1 C9 year in Y2 C10 year in Y3 A1 Impossible A2 Next Date NextDate DT 2nd try part 2 C1 month in M3 M3 M3 M3 M3 M3 M3 C2 day in D1 Di Di D2 D2 D2 D3 C3 year in Y1 Y2 Y3 Y1 Y2 Y3 A1 Impossible X x xX X A2 Increment day x A3 Reset day x X X A4 Increment month X X X A5 Reset month A6 Increment year NextDate Equivalence Classes M1 month month has 30 days M2 month month has 31 days M3 month month is February D1i day 1 lt day lt 28 D2 day day 29 D3 day day 30 D4 day day 31 Y1 year year 1900 or 2100 Y2 year year is a leap year Y3 year year is a common year NextDate DT 2nd try part 1 C1 month in C2 day in C3 year in A1 Impossible A2 Increment day A3 Reset day A4 Increment month A5 Reset month A6 Increment year
5. reality eliminate many potential applications In most applications the order in which the predicates are evaluated is immaterial Some specific ordering may be more efficient than some other but in general the ordering is not inherent in the program s logic 17 Applicability a The specification is given or can be converted to a decision table The order in which the predicates are evaluated does not affect the interpretation of the rules or resulting action The order of rule evaluation has no effect on resulting action Once a rule is satisfied and the action selected no other rule need be examined The order of executing actions in a satisfied rule is of no consequence 16 Decision Tables Issues a Before deriving test cases ensure that a The rules are complete a Every combination of predicate truth values is explicit in the decision table The rules are consistent a Every combination of predicate truth values results in only one action or set of actions 18 Guidelines and Observations a Decision Table testing is most appropriate for programs where a There is a lot of decision making There are important logical relationships among input variables a There are calculations involving subsets of input variables There are cause and effect relationships between input and output There is complex computation logic high cyclomatic complexity 19
6. rm t so that t is True and all other terms are False a Near False Points A variant for each literal in a term The variant is obtained by negating the literal and is selected only if it makes Z 0 a Each variant creates a test candidate set a Unique true point candidate sets in boiler example 12 9 11 15 25 4 Selecting the test cases At least one variant from each candidate set Can be done by inspection a Random selection is also used Near False Points exercise combinations of don t care values 6 of all possible tests are created 98 of simulated bugs can be found 27 4 Negation variants Candidate Term Variants Variants set number negation containing containing this negation this negation where Z 0 2 ABC 14 15 14 3 A B C 8 9 8 4 AB C 4 5 4 5 6 A D 8 10 12 14 8 10 14 7 AD 1 3 5 7 1 3 5 7 26 Test suite Candidate sets 12 14 8 4 5 9 11 15 8 10 14 1 3 5 7 a Minimum Test suite 5 8 9 12 14 28
Download Pdf Manuals
Related Search
Related Contents
Synology 406 Series Server User`s Guide Tree Spider TSSL Instructions / Assembly WEIGHT SYSTEM EXERCISER User`s Manual User Manual ELECTRO KABUKI DROP Mechanism HI 2020-01 User`s Manual Centrifugal Roof Fans Sac Harnais - Zodiac Aerospace INSTALLATION MANUAL HR910 Wireless Speaker User Manual ダウンロード(PDF 0.42MB) Copyright © All rights reserved.
Failed to retrieve file