$29
HW Discussion schedule - questions only answered according to the following schedule
Problems 1 and 2 - on or before 10/17
Problem 3 and 4 - on or before 10/24
Problem 5 - on or before 10/28
Question Weighting:
Question 1- 5 - 20 % credit each - total 100% credit
Use the EBP approach for each problem.
1. Develop CFG (reduced) and Cyclomatic complexity.
2. Develop basis path set.
3. Determine significance on each variable.
4. Add tests for missing Boundary Values not tested, including extreme range values - extreme range values for EACH variable that has a boundary condition in the code.
5. For basis path use the all true path as the first test case.
Submittal items, for each problem submit the following
1. Code description - a decision table (except for problem 5 where you will use a graph). Use slide 61 of M03 as a guide for the decision table format.
2. CFG (reduced) - can be hand drawn and scanned
3. Cyclomatic Complexity (indicate on the graph)
4. Test case table with basis paths (put these in the "Basis Path" column - where tests are addition to basis path set use a "-" to indicate the basis path. Make sure all true is the first BP.
5. Code coverage achieved
6. Test cases support or refute description?
Assume:
1. a significance of 1 Cent on financial calculations
2. Assume 0.1 on all doubles, unless otherwise specified.
3. Use Excel's default of rounding to the significance. For financial display $0.00 and doubles 0.0 except as otherwise indicated - this will implicitly round to the significance.
Proper application of the CFG to the basis path
1. Start at the upper left and work toward the lower right of the CFG flipping decisions from upper left toward lower right. Make sure to put nodes at subsequent levels on the CFG. See slides 41-44 of M09
1) Use basis path testing to develop the test cases for the following code. Use the line (statement) numbers below in your CFG. Assume that batteryPower ranges from 0.0 to 1,000.0 watts both inclusive.
Test case table format:
2) Use basis path testing to develop the test cases for the following code. Use the line (statement) numbers below in your CFG. Assume that premium ranges from $0.00 to $10,000.00, safetyRating from 1 to 999, yearsMember from 0 to 50 all inclusive, and taxRate from 0.00% to 10.00%. Use, taxRate= 8.25%
Test case table format
Mentally transform statements 26-34 into a multiple condition decision statement as described in slides 41-52 of M09 and show the MCDC test cases for this logical expression in the test case table.
For the decision table (description) implement statements 12-24 as a decision table and then separately provide the logical expression for statements 26-34
3) Use basis path testing to develop the test cases for the following code. Use the line (statement) numbers below in your CFG. Assume distance ranges from 0.0 to 1,000.0 feet and speed from 0.0 to 100.0 all inclusive.
Test case table format:
Mentally transform statements 22-26 into a multiple condition decision statement as described in slides 41-52 of M09 and show the MCDC test cases for this logical expression in the test case table.
For the decision table (description) implement statements 9-20 as a decision table and then separately provide the logical expression for statements 22-26
4) Use basis path testing to develop the test cases for the following code. Use the line (statement) numbers below in your CFG. Assume that altitude ranges from 0.0 to 10,000.0 feet and that speed ranges from 0.0 to 1,000.0 mph all inclusive.
Test case table format:
Mentally transform statements 8-11 into multiple condition decision statement as described in slides 41-52 of M09 and show the MCDC test cases for this logical expression in the test case table. Also, transform statements 13-16 in a similar manner and describe the MCDC tests similarly. As an example, "stmt 8-11 FFFF" would go in the test case table MCDC column if that is one of the test cases used to test the multiple condition statement using MCDC.
5) Use basis path testing to develop the test cases for the following code. Use the line (statement) numbers below in your CFG. Use the following template for the test case table. Assume that x ranges from -6.00 to 8.00 both inclusive. Assume both y and y are significant to 0.01 (use Excel's answer without truncation which means it will round to the 0.01).
Add tests as follows:
1. For each linear region, in the middle of the ECP.
2. For each parabolic - at the max/min and mid-range (mid-range of x) on one side of the max/min. (2 tests total).
Submit the graph with your solution. Develop your tests using the graph. You may hand draw the graph and scan BUT IT MUST BE GRADEABLE. You must label the axes and show values across each axis at points of interest.
Test Case table format