Uploaded by Partay Hat

ExerciseReport

advertisement
CS 1632 Software Quality Assurance
Exercise 1
Member 1 Name: Aidan Dougherty
Member 2 Name: Zane Kissel
Team Name: Cool Team
1. Introduction
a. One Base Case
Provide the IDENTIFIER of a base case that you tested. Explain why this is a base case.
In TEST-SMALL-NUM-ARG we test the program using values that should be accepted by the
system, while also using less than 100 for ‘number of times.’ We are testing the requirement
of the system that says it shall prompt the user if they enter less than 100 for ‘number of
times.’ This is a base case because we are not testing for functionality other than the system
handling positive integers for ‘number of times.’ This means that all inputs for the test are
syntactically correct, as we aren’t testing for obscure functionality.
b. One Edge Case
Provide the IDENTIFIER of an edge case that you tested. Explain why this is an edge case.
In TEST-INVALID-ARG-NUM-THREADS we are testing the system with usual values for
everything except for number of threads. For the value of number of threads, we test
negative integers, zero, strings, and doubles. These are edge cases because they are
extreme input values that the system may handle inappropriately. We are entering normal
values for everything except for number of threads.
c. One Corner Case
Provide the IDENTIFIER of a corner case that you tested. Explain why this is a corner case.
In TEST-DISPLAY-ITERATIONS we are testing if each thread was able to have its fair share of
iterations while running the program. In a test case we tested both the iterations and
number of threads at a high number to see what would happen. As expected, it still worked.
This was a corner case because we had more than one parameter at an extreme, rather than
just one (which would be an edge case).
2. Traceability Matrix
TEST-ARGSNUMBER
TEST-INVALIDARG-NUMTHREADS
TEST-INVALIDARG-NUMTIMES
TEST-INVALID
-DISPLAYRESULTS
TEST-DISPLAYITERATIONS
TEST-SMALLNUM-ARG
FUN-SMALL-NUM
FUN-DISPLAY-ITERATIONS
FUN-DISPLAY-RESULTS
FUN-ARGS-INVALID
FUN-ARGS-NUMBER
Complete the traceability matrix below. An “X” mark in a cell means that the test on the row
verifies the requirement on the column.
X
X
X
X
X
X
3. Test Cases
IDENTIFIER: TEST-ARGS-NUMBER
TEST CASE: Ensure the program properly manages being supplied with too many or too few arguments.
PRECONDITIONS: JDK version "1.8.0_382" installed and GoatGoatCar.jar in working directory
EXECUTION STEPS: Run the terminal commands:
java -jar GoatGoatCar.jar car goat 10001 4 0
java -jar GoatGoatCar.jar car goat 10001 4 test 0
java -jar GoatGoatCar.jar car goat 10001
java -jar GoatGoatCar.jar
POSTCONDITIONS: For all scenarios, the system shall display the usage information and shutdown.
IDENTIFIER: TEST-INVALID- ARG-NUM-THREADS
TEST CASE: Ensure the program properly manages being provided non-integers/negative integers/zero
for number of threads.
PRECONDITIONS: JDK version "1.8.0_382" installed and GoatGoatCar.jar in working directory
EXECUTION STEPS: Run the terminal commands:
java -jar GoatGoatCar.jar car goat 10001 test
java -jar GoatGoatCar.jar car goat 10001 -10
java -jar GoatGoatCar.jar car goat 10001 8.00
java -jar GoatGoatCar.jar car goat 10001 0
POSTCONDITIONS: For all scenarios, the system shall explain the reason it cannot run (number of
threads must be positive integer) and shut down.
IDENTIFIER: TEST-INVALID- ARG-NUM-TIMES
TEST CASE: Ensure the program properly manages being provided non-integers/negative integers/zero
for number of times.
PRECONDITIONS: JDK version "1.8.0_382" installed and GoatGoatCar.jar in working directory
EXECUTION STEPS: Run the terminal commands:
java -jar GoatGoatCar.jar car goat test 4
java -jar GoatGoatCar.jar car goat -10 4
java -jar GoatGoatCar.jar car goat 1.56 4
java -jar GoatGoatCar.jar car goat 0 4
POSTCONDITIONS: For all scenarios, the system shall explain the reason it cannot run (number of times
must be positive integer) and shut down.
IDENTIFIER: TEST-SMALL-NUM-ARG
TEST CASE: Ensure the program properly manages being provided an integer less than 100
PRECONDITIONS: JDK version "1.8.0_382" installed and GoatGoatCar.jar in working directory
EXECUTION STEPS: Run the terminal commands:
java -jar GoatGoatCar.jar car goat 1 4
java -jar GoatGoatCar.jar car goat 99 4
java -jar GoatGoatCar.jar car goat 65 4
java -jar GoatGoatCar.jar car goat 100 4
java -jar GoatGoatCar.jar car goat 1000000 4
POSTCONDITIONS: For all scenarios, each run of the program should correctly display the percentages,
three decimal points, and the given string options.
IDENTIFIER: TEST-INVALID-DISPLAY-RESULTS
TEST CASE: Ensure the program properly displays the results with the passed in strings and percentages
with up to three decimal places.
PRECONDITIONS: JDK version "1.8.0_382" installed and GoatGoatCar.jar in working directory
EXECUTION STEPS: Run the terminal commands:
java -jar GoatGoatCar.jar good ) 1001 4
java -jar GoatGoatCar.jar good bad 1001 4
java -jar GoatGoatCar.jar car 1001 4
java -jar GoatGoatCar.jar goat 1001 4
POSTCONDITIONS: For all scenarios, the program should display the results with the given good/bad
option and percentages to the third decimal place.
IDENTIFIER: TEST-DISPLAY-ITERATIONS
TEST CASE: Ensure the program properly divides the work between the number of threads given.
PRECONDITIONS: JDK version "1.8.0_382" installed and GoatGoatCar.jar in working directory
EXECUTION STEPS: Run the terminal commands:
java -jar GoatGoatCar.jar car goat 1 4
java -jar GoatGoatCar.jar car goat 100 4
java -jar GoatGoatCar.jar car goat 9023 4
java -jar GoatGoatCar.jar car goat 100 7
java -jar GoatGoatCar.jar car goat 100 100
POSTCONDITIONS: For all scenarios, each thread should have the same amount of iterations +- 1
iteration.
4. Link to GitHub issues
https://github.com/CS1632/exercise-1-test-plans-cool-team-1/issues/1
https://github.com/CS1632/exercise-1-test-plans-cool-team-1/issues/2
https://github.com/CS1632/exercise-1-test-plans-cool-team-1/issues/3
Download