UMBC CMSC 202
UMBC CMSC 202 CSEE | 202 | current 202

CMSC 202 Spring 2006
Homework 1

Testing, Testing, Testing

Assigned Sunday February 5, 2006
Program Due Sunday February 12, 2006 at 11:59pm
Updates 2/8/06 - Clarification on submission files

Objectives


Description

One of the primary reponsibilities within every software production company is that of the Software Tester. There are a large variety of approaches to testing software that you will learn about in future courses. In the meantime, it is the goal of this assignment to introduce a strategy for testing that you can adopt in testing your own applications.

Assignment

You have been tasked with the responsibility of thoroughly testing three applications that were developed by another programmer within your company. The programmer created 4 versions of each application and needs to figure out which is the correct version. There is exactly one correct version of each application. However, your company needs you to thoroughly document what bugs you find in the other three versions.

Applications

Dice Roller (Dice1, Dice2, Dice3, Dice4)
This application rolls two dice that could be used for a variety of computer games. The values of each of the two die are one (1) through six (6). You can roll again by selecting 'Y' or 'y' when prompted, any other value will imply no.

Rock, Paper, Scissors (Rock1, Rock2, Rock3, Rock4)
This application plays Rock, Paper, Scissors against the user. The computer will randomly generate its own guesses, and the user can type 'R', 'P', or 'S' in each round to play. At the very beginning of the application, the user can enter the number of rounds they wish to play. When the total number of rounds are over, the computer will display the number of wins for each the computer and the user. Determining the winner follows the standard RPS rules, Rock beats Scissors, Scissors beats Paper, Paper beats Rock.

Three Word Sorter (Sort1, Sort2, Sort3, Sort4)
This application sorts three words at a time that the user supplies. If you would like to continue to enter in sets of words, you can respond with 'y' or 'Y' when prompted. The comparison used is a dictionary-based comparison: A < a < B < b < ... < Z < z. Also, shorter words are less than longer words. In example, the words {b a c} would be sorted as {a b c}, {a A B} would be sorted as {A a B}, and {aa a aaa} would be sorted as {a aa aaa}.

Testing Strategy

It is your responsibility to thoroughly test each application to determine precisely what is wrong with it and which is the correct version. It is recommended that you following the test development strategy introduced in the first lab.

Use input and output redirection to create testing files to run each application. Combine this with extending your makefile to run testing commands - remember, when creating targets, dependencies and commands in a makefile - any command can be used, it need not be a command for compiling some program. Think about using a "tester" target that runs a set of commands to run the applications through your test suite.

You must automate as much of the testing system as you can. Imagine if there were 100 applications to test, how might you use a makefile to help simplify your test runs?

Writeup

Obviously, there is no application development for this homework, we are only interesting in ensuring that you can create testing suites and can find errors in existing programs without know much about how they were written.

You should turn in a README document that describes the following:
For each application

Be specific, you must demonstrate a thorough understanding of what was incorrect in each application, answers such as "doesn't sort correctly" would not be specific enough. You must provide enough detail that the developer could easily locate and fix the error.

Files

You can copy the applications to test from the following directory: /afs/umbc.edu/users/d/a/dana3/pub/CMSC202/hw1/ Your makefile should have its first target run all of your test cases.

Grading

The grade for this homework will be broken down as follows. A more detailed breakdown will be provided in the grade form you receive with your homework grade.

100% - Correctness

This list may not be comprehensive, but everything on this list will be verified by the graders.

Homework Submission

What to Submit [Updated]

You should submit the following files:

Steps for Submission

  1. submit all files
  2. submitls to verify they are in the remote directory
  3. submitmake to build your files remotely
Assuming you've used the recommended file names, then to submit your homework, type the command submit cs202 Hw1 files ... The order in which the files are listed doesn't matter. However, you must make sure that all files necessary to compile your project (using the makefile) are listed. You need not submit all files at the same time. You may resubmit your files as often as you like, but only the last submittal will be graded and will be used to determine if your project is late. For more information, see the projects page on the course website.

You can check to see what files you have submitted by typing

submitls cs202 Hw1

Be sure to build your project once it has been submitted using the submitmake command, so that you know that all of the files are there and are the most up-to-date versions:

/afs/umbc.edu/users/d/a/dana3/pub/CMSC202/submitmake cs202 Hw1

More complete documentation for submit and related commands can be found here.

Remember -- if you make any change to your program, no matter how insignificant it may seem, you should recompile and retest your program before submitting it. Even the smallest typo can cause compiler errors and a reduction in your grade.

Avoid unpleasant surprises!

Be sure to use the submitmake utilities provided for you to compile, link and run your program after you've submitted it.


Last Modified: Wednesday, 08-Feb-2006 22:15:16 EST