Assignment 1

Testing with Input Space Partitioning

For this project, you will examine and test an open source program of your choice that reads in a file and produces output. The program must perform some nontrivial transformation or computation based upon the provided file (and possibly command line options). For instance, the cat command would be grossly insufficient. In previous semesters, students have had success looking at programs that, for instance, convert CSV format files to XML format files. Many such csv2xml programs can be found on the internet.

Following the processes outlined in class, this assignment incorporates the following components.

  1. Specification of the Program Under Test
  2. Category-Partition Test Specification
  3. Test Suite Generator
  4. Test Report

Students may work individually or in teams of two for this project.

Specification of the Program Under Test

Provide a concise specification of the input/output requirements of the program or portion of a program that you are testing, with references to appropriate documents.

Category-Partition Test Specification

Recall the category-partition method as a process to guide input space partitioning. Determine a set of categories of input and environmental variables that can be used in testing your program following the category-partition method. Identify appropriate choices to test for each category. Add property, selector, and error annotations to control combinations.

Test Suite Generator

Implement a test suite generator that generates actual test case input files according to your test specification. In this case, you won't write or use a general program to produce test frames but a specific program that produces test cases.

For example, to test a csv2xml program, one approach is to have the test suite generator produce a TestData directory with three subdirectories: TestFiles, ExpectedOutput, ExpectedMessages. The TestFiles directory contains all the input files for your test cases with one input file per case. The ExpectedOutput directory contains an expected XML output file for every input file. The ExpectedMessages directory contains an expected message file for every test file, with the kind of error message expected. You design the structure of these files to work with a test harness script that you also write. This test harness calls the csv2xml on each input file and produces the outputs into directories TestOutput/Files and TestOutput/Messages. These results can then be easily compared with the expected results, e.g. using diff.

Test Report

Using the generated test suite, evaluate the program under test and report the results.

You should document and explain each component of your assignment in an assignment report that you submit along with all components of the project.

The assignment is due 11:59 pm on Monday, February 3, 2014. It is worth 1/3 of your overall assignment grade.

Much of the structure for this projects is based on plans by Rob Cameron