Basis Path Testing Homework

Problem #1

Apply the Basis Path Testing method (see example) to derive the test cases needed to perform minimum complete coverage of the processMove method.  Print the source code and annotate it with node numbers.  Draw the flowgraph for the program, calculate the cyclomatic complexity, and list the basis set of independent paths you create. Derive the necessary test cases and record them on the basis path test worksheet form.  Under "Expected Outcomes" include all values that are changed as well as results displayed.

Problem #2

A program is required to read a file of text (such as an electronic book) and return a list of the sentences in the text.  Here is the Java implementation: getSentences.java .

Use the Basis Path Testing Method to derive a set of test cases. Print the source code and annotate it with node numbers.  Draw the flowgraph for the program, calculate the cyclomatic complexity, and list the basis set of independent paths you create.  Complete the basis path test worksheet with your planned test data.

Carry out your test plan by writing a data file holding your test data and a corresponding JUnit test that uses your data file. Print your data file and your JUnit test. Create a printout that shows the results of your JUnit test execution. Submit your annotated code, flowgraph diagram, worksheet and printouts. 

Grading


instructor solution

Last modified on 05/29/2023 02:07:34