University of Arizona, Department of Computer Science

CSc 120 (Spring 2025): Assignment 10 Black-box Tests

Submission Deadline: 7PM Thu Apr 22

You are to submit five black-box test inputs for the long problem for this assignment. The black-box tests are worth one point per test input for a total of five points.

What to submit

For the long problem, put all five black-box inputs into a single text file, named battleship-tests.txt.

Within that file, organize the tests as follows:

# Test ID. (a number for identification purposes, plus an indication of whether it is a regular/edge case/error test)
# What aspect of the program's behavior this is testing
#   (English prose, one or two sentences).

The test input (keep it as short as you can while meeting the test goals)
If the test case is too large to include, describe it in English instead. For example, for a large file, you could say, "The test case is a file of 50,000 words."
# End of test

In some situations, it may be impossible to provide an actual test input (e.g., if the test input involves a nonexistent or unreadable file). In this case, provide a short English description (one or two sentences) of the test.

Submit at most two normal-behavior tests and at most two error-behavior tests. The fifth test can be either a normal-behavior test or an error-behavior test.

Grading criteria

The test cases you submit will be graded using the following criteria:

  1. Do they test different things? Having a lot of tests that test the same thing is not useful.

  2. Are they meaningful? Do they test some aspect of the program's behavior that makes sense to test given the assignment spec?

Example

Here is an example of a black-box test file in the format described above.
# Test 1 (error)
# This tests whether the program can handle radioactivity in the input
The input is a large lump of Uranium-238
# End of test
 
# Test 2 (error)
# This tests whether the program handles negative numbers
-27
# End of test
 
# Test 3 (edge case)
# This tests whether the program can handle an empty list as input
[]
# End of test
 
# Test 4 (regular)
# This tests the program's behavior on a non-empty list of numbers
[1, 2, 3, 4]
# End of test
 
# Test 5 (regular)
# This tests the program's behavior on a non-empty list of strings
['aaa', 'bbb', 'ccc']
# End of test