##
This **preview** shows page *1-2-14-15-30-31*
out of 31 **pages**.

*View Full Document*

End of preview. Want to read all 31 pages?

Upload your study docs or become a GradeBuddy member to access this document.

View Full Document**Unformatted text preview:**

Software TestingTestingTesting MethodologiesTypes of TestingFunctional TestingStructural TestingBoundary Value TestingSlide 8Boundary Value AnalysisSlide 10Input Domain of a function for two variablesBoundary value analysis test cases for a function of two variablesGeneralizing boundary value analysisRobustness TestingRobustness Testing range of inputsWorst-Case TestingSlide 17Slide 18Slide 19Special Value TestingRandom TestingGuidelines for Boundary Value TestingEquivalence ClassesSlide 24Weak Normal Equivalence Class TestingStrong Normal Equivalence Class TestingWeak Robust Equivalence Class TestingStrong Robust Equivalence Class TestingGuidelines and ObservationsGuidelines and Observations (cont.)Questions?Software TestingTesting 1. We test to find errors2. A good test case has a high probability of finding an as yet undiscovered error3. A successful test uncovers an as yet undiscovered error4. Testing cannot prove the absence of defects, only that defects are present.Testing Methodologies•Inspection/Review/Observation•Demonstration•Simulation/Prototyping•Live Scenarios (normal and abnormal operation)•StressTypes of Testing•Functional–Establishes confidence•Structural–Seeks faults•Integration–Tests modules together•System–Tests in the environment•User acceptance–Idiot proofing•Regression–After repairingFunctional TestingInputs Outputsf(inputs) = outputsStructural TestingInputs OutputsBoundary Value Testing•Boundary Value Analysis•Robustness Testing•Worst-Case Testing•Special Value Testing•Random TestingBoundary Value Testing•Refers to testing along the boundaries of the input domains of a function.•The purpose is to stress the limits of the function and determine if it responds correctly to proper and improper inputs.Boundary Value AnalysisBoundary Value Analysis refers to analysis of functions with inputs from a range of values that have boundaries.a x bIf there are two input variables x1 and x2, then the boundaries might be: a x1 b c x2 dBoundary Value Analysis•The intervals [a,b] and [c,d] are referred to as the ranges of x1 and x2.•One of the reasons for strong typing in some programming languages, is to prevent cases where boundary value analysis will not help in testing.•Limited in cases where the inputs are not independent, or the ranges of the inputs is not bounded.Input Domain of a function for two variablesx2x1dca bFigure 5.1 from the textbook.Boundary value analysis test cases for a function of two variablesx2x1dca bFigure 5.2 from the textbook.Generalizing boundary value analysis•Can be generalized in two ways:–Number of variables•Hold one variable at nominal value and run test cases for all of the others at the boundaries.•Repeat for all input variables•For n inputs, 4n +1 test cases–Kinds of ranges•What are the types of the inputs•Are their minimums and maximums?Robustness Testing•Extension of Boundary value testing•Add boundary values outside of the range of inputs allowed.•The philosophy here is to make the function fail gracefully.Robustness Testing range of inputsx2x1dca bFigure 5.3 from the textbook.Worst-Case Testing•Boundary Value Analysis makes the Single Fault Assumption of Probability Theory•What happens when more than one variable has an extreme value?–Worst Case AnalysisWorst-Case Testing•For each variable, start with the five element set {min, min+, nom, max-, max}•Take the cartesian product of these sets and generate test cases from these.Worst-Case Testingx2x1dca bFigure 5.4 from the textbook.Worst-Case Testingx2x1dca bFigure 5.4 from the textbook.Special Value TestingMost popular form of functional testingBased on domain knowledge of the testerPick values that are likely to cause a problemFebruary 29 for a date, June 31…Random TestingUse a random number generator to generate test cases.Statistically the most valid method.How many test cases are needed to adequately test the function?Guidelines for Boundary Value Testing•Test methods based on input domain of the function are rudimentary.•Share the common assumption that input variables are independent. This is dangerous•Two other distinctions:–Normal vs. Robust–Single vs. Multiple Fault AssumptionEquivalence Classes•Equivalence Classes form a partition of a set–The partition is a collection of mutually disjoint subsets when the union of those subsets is the entire set.•Completeness•Non-redundancy–Elements of the subset (Equivalence Class) have something in common.•Equivalence Class Testing selects test cases by choosing one element from each equivalence class.Equivalence Classes•Key to equivalence class testing is the choice of equivalence relation that determines the classes.•For example purposes, consider an expanded function, F–F(x1, x2) for a x1 d, with intervals [a,b), [b,c),[c,d]and e x2 g, with intervals [e,f), [f,g]•Weak Normal Equivalence Class Testing•Strong Normal Equivalence Class TestingWeak Normal Equivalence Class Testing•Follows Single Fault Assumption•Use one variable from each equivalence class (interval).x1fea dFigure 6.1 from the textbook.b cgStrong Normal Equivalence Class Testing•Based on the Multiple Fault Assumption•Test cases taken from each element of the cartesian product of the intervals.x1fea dFigure 6.2 from the textbook.b cgWeak Robust Equivalence Class Testing•For valid inputs, use one value from each valid class•For invalid inputs, use one invalid value, and the rest valid.x1fea dFigure 6.3 from the textbook.b cgStrong Robust Equivalence Class Testing•Name is redundant•Invalid values for all possible combinations.x1fea dFigure 6.4 from the textbook.b cgGuidelines and Observations1. The weak forms of equivalence class testing are not as comprehensive as the corresponding strong forms.2. If the implementation language is strongly typed, then robust makes no sense.3. If error conditions are a high priority, the robust forms are appropriate.4. Equivalence class testing is appropriate when input data is defined in terms of intervals and sets of discrete values, especially when system malfunctions can result from improper inputs.Guidelines and Observations (cont.)5. Equivalence class testing is strengthened by a hybrid approach with boundary value testing.6. Equivalence class testing is appropriate when the function is complex.7. Strong equivalence class testing makes

View Full Document