Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This individual assignment has two parts. For Part I, you must generate test case specifications for the version of the capitalize utility, whose specs are

This individual assignment has two parts. For Part I, you must generate test case specifications for the version of the capitalize utility, whose specs are provided below, using the category-partition method. For Part II, you will demonstrate how some of your test frames may be used, by developing test cases that implement them.

Concise Specification of the capitalize Utility

  • NAME: capitalize - capitalizes words in a file.

  • SYNOPSIS capitalize OPT where OPT can be zero or more of

    • -l
    • -e
    • -s []
    • -x
  • COMMAND-LINE ARGUMENTS AND OPTIONS

filename: the file on which the capitalize operation has to be performed.

-l: if specified, the capitalize utility will capitalize all the first characters in each new line, including the first line.

-e: if specified, the capitalize utility will capitalize all the letters in each exclamatory sentence (i.e., in each sentence ending with a !).

-s []: if specified, the capitalize utility will capitalize the first character of each sentence. Sentences end by default with one of the characters ., !, or ?. The optional string of delimiters can be used to specify an alternative set of sentence delimiters that replace the default ones.

-x: if specified, the capitalize utility will lowercase all existing capital letters that do not meet the specified capitalization rules.

If none of the above OPT flags is specified, capitalize capitalizes all whitespace delimited words in the file. Otherwise, the specified flags override the default behavior, as illustrated in the examples below.

  • EXAMPLES OF USAGE

Example 1:

capitalize file1.txt would capitalize the first character in every whitespace delimited word.

Example 2:

capitalize -l file1.txt would capitalize only the first character in every line.

Example 3:

capitalize -e -s file1.txt would capitalize the first character in every sentence and every letter in every exclamatory sentence, where a sentence is defined as ending in one of the characters ., !, or ?. Example 4: capitalize -s , -x file1.txt would capitalize all and only the first character in each sentence, where a sentence is defined as ending in a comma (such as the fields in a csv file).

  • NOTES If the character to be capitalized is not a letter, it is left unchanged. While the last command-line parameter provided is always treated as the filename, the OPT flags can be provided in any order.

Part I

Generate between 50 and 100 test-case specifications (i.e., generated test frames) for the capitalize utility using the category-partition method. Make sure to look at the slides, attend to the lecture or watch the recording, and watch the demo before getting started. I also suggest to first work with your group on the first part of the group exercise. Make also sure to use constraints and properties appropriately (rather than eliminating choices) to keep the number of test cases within the specified thresholds.

When defining your test specifications, your goal is to suitably cover the domain of the application under test. This also includes possibly erroneous inputs. Just to give you an example, if you had to test a calculator, you may want to cover the case of a division by zero. (Note that the domain is constrained to the java application under test, so you should not be concerned with the way command-line arguments are parsed by the shell.)

Please also keep in mind that you are only required to specify test inputs, but you do not have to also specify the expected outcome for such inputs. It is therefore OK if you do not know how the system would behave for a specific input. Using the same calculator example, you could test the case of a division by zero even if you do not know how exactly the calculator would behave for that input.

Tools and Useful Files

You will use the TSLgenerator tool to generate test frames starting from a TSL file, just like in the demo. A version of the TSLgenerator tool for Linux, Mac OS X, and Windows, are available here (linked from the "slides and additional links" folder in this module).

The .zip also contain the demo TSL files and a manual. I will share the files of the example we will see in class after our lecture.

Important:

  • These are command-line tools, which means that you have to run them from the command line, as we do in the video demo, rather than by clicking on them.

  • On Linux and Mac systems, you may need to change the permissions of the files to make them executable using the chmod utility. To run the tool on a Mac, for instance, you should do the following, from a terminal: chmod +x TSLgenerator-mac ./TSLgenerator-mac

  • You can run the TSLgenerator tool as follows: [--manpage] [-cs] infile [-o outfile] Where is the specific tool for your architecture, and the command-line flags have the following meaning: --manpage Prints the man page for the tool. -c Reports the number of test frames that would be generated, but does not actually produce them. -s Outputs to standard output. -o outfile Outputs to file outfile, unless the -s option is also used.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Types of Interpersonal Relationships?

Answered: 1 week ago

Question

Self-Disclosure and Interpersonal Relationships?

Answered: 1 week ago