



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Class notes for CSE565 Sept. 8th Prepared by Tao Hu, Young Jin Kwon Test Case A set of test inputs, execution conditions, and expected results developed to verify compliance with a specific requirement or requirements. [1] Simply, we can write like: Test Case = [input, expected output] The cost of developing test cases There are two cost need to consider: The cost of generating inputs The cost of generating expected outputs In general, it’s more difficult to generate expected outputs than to generate the inputs. The generating expected output is more expensive. Oracle Problem An example of oracle problem: Suppose we have a new calculator with Fast Fourier Transform and Kalman Filter, how do we know its functions are correct? There are two ways: Use existing software/hardware This way is to compare it with existing software and hardware; as we know there are some other calculators that work, so we compare with them. Redundancy – duplicate the effort and use to cross check For example: if there is one requirement, we give it two designs and two implements, so each of them can do cross check. One requirement Design 1 Design 2 Implementation 1 Implementation 2 Cross check Cross check
This approach is based on the assumption that two independent projects don’t make the same mistakes. Cross validation is seldom being practiced for the obvious reason: that we often have trouble or no enough time to implement one version, it is impossible to make it two versions. Path coverage This measure reports whether each of the possible paths in each function have been followed. A path is a unique sequence of branches from the function entry to the exit. [2] An example: There are 4 paths in the diagram. The problem of path coverage Path coverage has two severe disadvantages. The first is that the number of paths is exponential to the number of branches. For example, a function containing 10 if- y n y y n n
Data: - variable (global, local, parameters)
programming language became more dynamic, we have to worry more about dynamic aspects. Path coverage completing problem: Suppose that we have path like There are 16 paths. If we do partitioning once in the center, there will be 4 + 4 = 8 paths. By doing this, we have to consider one integration. If we partition it in 4 parts, there will be 3 integrations. More partitioning we do, more integration have to be considered. It is not always good to do as many partitioning as possible. The cost and partition relation is shown as the curve below. The cost initially goes down, then at some point, rises up. Why? Because we push path problem into integration problem. Partitioning Cost