Question: Determine the data flow graph for the below source code. Then, state the minimal set of test cases that achieves all-c-uses/some-p-uses, all-p-uses/some-c-uses, and all-du-paths coverage

Determine the data flow graph for the below source code. Then, state the minimal set of test cases that achieves all-c-uses/some-p-uses, all-p-uses/some-c-uses, and all-du-paths coverage for variables ti and tv. Clearly state which du-paths are needed for all-c-uses/some-p-uses coverage, which ones for all-p-uses/some-c-uses coverage, and which ones for all-du-paths coverage. Explain which test cases in your set are needed for all-c-uses/some-p-uses coverage, which ones for all-p-uses/some-c-uses coverage, and which ones for all-du-paths coverage. For each test case, state the required test input. public static double ReturnAverage(int valuel], int AS, int MIN, int MAX) int i, ti, tv, sum; double av; i = 0; t = 0; tv = 0; sum = 0; while (ti AS && value [i] !--999) { ti++ if (value[i]MIN&&value[i]- MAX) tv+t; sum = sum + value[1]; av-(double) sum/tv; else av-(double) -999; return (av) Determine the data flow graph for the below source code. Then, state the minimal set of test cases that achieves all-c-uses/some-p-uses, all-p-uses/some-c-uses, and all-du-paths coverage for variables ti and tv. Clearly state which du-paths are needed for all-c-uses/some-p-uses coverage, which ones for all-p-uses/some-c-uses coverage, and which ones for all-du-paths coverage. Explain which test cases in your set are needed for all-c-uses/some-p-uses coverage, which ones for all-p-uses/some-c-uses coverage, and which ones for all-du-paths coverage. For each test case, state the required test input. public static double ReturnAverage(int valuel], int AS, int MIN, int MAX) int i, ti, tv, sum; double av; i = 0; t = 0; tv = 0; sum = 0; while (ti AS && value [i] !--999) { ti++ if (value[i]MIN&&value[i]- MAX) tv+t; sum = sum + value[1]; av-(double) sum/tv; else av-(double) -999; return (av)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
