+2 votes
in Software Engineering by
You have been asked to test a method called catWhiteSpace in a “Paragraph” object that, within the paragraph, replaces sequences of blank characters with a single blank character. Identify testing partitions for this example and derive a set of tests for the catWhiteSpace method.

1 Answer

0 votes
by
selected by
 
Best answer

Given example scenario is to test a method called “catWhiteSpace” in a “Paragraph” object that, within the paragraph, replaces sequences of blank characters with a single blank character.

Testing partitions for the scenario:

• Sentences with only single blank characters.

• Sentences with sequences of blank characters in the middle of the sentence.

• Sentences with sequences of blank characters at the beginning of the sentence.

• Sentences with sequences of blank characters at the end of the sentence.

Set of example tests for the method ‘catWhiteSpace’:

• Testing can only show the presence of errors, not their absence. (only single blank characters)

• Testing can only show the presence of errors, not their absence. (several blank spaces in the sentence)

• Testing can only show the presence of errors, not their absence. (2 blanks at the beginning)

• Testing can only show the presence of errors, not their absence . (2 blanks at the end)

• Testing can only show the presence of errors, not their absence. (several blanks at the beginning)

• Testing can only show the presence of errors, not their absence . (several blanks at the end)

Related questions

Welcome to CPEN Talk
Solution-oriented students of computer engineering on one platform to get you that

ONE SOLUTION

Chuck Norris's log statements are always at the FATAL level.
...