For the Translator:
Invocation Coverage Plan
The parser has a well-defined program flow so we need to use files that contain conditions that satisfy the different paths allowed. Each path results in a common path involving procedures,
main-->parse-->getToken where getToken results
in the different function calls to placeToken, placeHotkey and
Error. Thus, to test that each function/procedure is executed,
three input files are required to test each path, and one general
file to test them all.
Branch Coverage Plan
Since we have three general paths that will test
to show that every line is invoked, our test cases will contain
sufficient information that will test each conditional branch
within placeToken, placeHotkey and Error. The translator basically
takes a file at one end and outputs an updated file at the other
end. This updated file will contain the necessary lines for the
new components now being used. So, our general test file will
handle this test case as well.
Loop Coverage Plan
The translator has one loop in the parser which continually
tests to see if the infile is at End of File. If not EOF then
it calls getToken and placeToken. It also calls placeHotkey when
certain conditions exist. As before, our general test case will
be suitable for this coverage testing.
Condition Coverage Plan
As before, our general test case will satisfy this test plan, but it is convenient for us to use the test files from the invocation coverage plan to satisfy all conditional expressions.
Page 4 |
Document Index |
Page 6 |