Test Case Scenario - Marymount Commons

advertisement
Midterm Grading Program
Test Case Scenario
Aimen Aberra
Assignment 3 Test Case / Scenario Documentation
February 27, 2014
IT 355 Software Testing, Documentation and Quality Assurance
Dr. Diane Murphy
Marymount University
“On my honor, I have neither given nor received aid on this assignment.
Table of Contents
1.
Introduction .............................................................................................................................. 2
2.
The Application ....................................................................................................................... 2
3.
Test Environment ..................................................................................................................... 3
4.
Test Plan................................................................................................................................... 4
5.
Effort Estimation ...................................................................................................................... 4
6.
Risks......................................................................................................................................... 5
7.
Test Cases ................................................................................................................................ 6
Midterm Grading Program Test Report
1
1. Introduction
This document is the Software Test Report for Midterm Grading program. The intended audience is the
Testing Manager and the Tester. It contains the type of tests to be conducted, the input to be entered or code to
be executed during the testing phase, the expected outcome of the test, and the status of the test scenario.
2. The Application
The application collects data for a student’s midterm grades in a specific semester. It allows the user to
enter five grades, values 0 to 100, and calculates the overall average. It then assigns a grade and displays the
result bellow the submit button. The user enters a name and score of each course. This is used to calculate and
display the letter grade average of the courses entered.
Figure 1 Application
The tester will be provided with the application, the source code and a controlled testing environment.
To test the application the tester will enter a series of values in the application and observer the outcome. The
tester will try several different combinations of inputs and report the results in the table provided in the test case
section of this report.
The tester is also provided with the code for the application. Using this the tester is to conduct tests by
hard coding values and testing any decision or condition lines of code. The tester then reports the results in the
table provided in the test case section of this report.
3. Test Environment
The test environment consists of a MacBook Pro with Mavericks (OSX 10.9.1) operating system,
running Windows 8 Pro (64 bit, 8.1 edition) in Parallels Desktop 8 for Mac virtual environment. The MacBook
Pro is a 2 GHz Intel Core i7 with 8 GBs of memory. 2 GBs of memory and 4 cores have been designated to the
operation of Windows 8 under the Parallels virtual environment.
Figure 2 Application Running on Windows 8 in Parallels Desktop
The code will be inspected using Mac version of Sublime Text 2 that shows line numbers. The code will
be then modified and tested piece by piece, as the test cases require.
Figure 3 The Code in Sublime Text 2
4. Test Plan
The test will be conducted in two stages. The first stage will look at the application by using various
inputs and observing the outcome. The second stage will look at the code and conduct tests on the lines of code,
as well as the conditional statements and test the logic. The instructions and expected outcome are available in
the table in the test case section. The tester will enter the results in the table in the designated area.
Using black box testing technique, for this application, the test cases will use boundary value analysis,
equivalence partitioning and error guessing. Using white box testing technique on the code, the test cases will
use condition coverage, decision coverage, logic coverage, multiple-condition coverage and statement coverage.
5. Effort Estimation
Due to the small size of the application, the phase one tests should take about one to three hours for a
tester to complete. Phase two tests will take about three to six hours due to the number of lines of code. Overall
the test should be complete in about one day.
6. Risks
Even though this program is small, there are some possible risks involved with this project.
Illogical processing: There is a possibility of errors within the code that allow the program to show
correct and incorrect results. The programs failure to detect the data types entered or failure to check if the
correct values are entered will allow the program to still calculate a result. The tester should be aware of this
and continue the test as instructed.
Program errors: There is a possibility of errors in the program that cause it to crash. Due to the nature
of the testing environment using a virtual machine we can mitigate critical errors that cause the system to crash.
If the errors cause major system problems, we can close that instance of the virtual machine and start a new one
without wasting time on resetting the computer.
Cascading errors: Failure to detect illogical errors and program errors have a way of triggering new
errors. There may be deeper issues with the program that the tester should be aware of during testing phase.
7. Test Cases
ID
Test Case
Test Scenario
Inputs
Expected Result
1
Lower Boundary
Value Analysis
Testing the lower level boundary
values of the grade input.
Enter 0 for each
score
Grade Displayed is
F
Testing the lower level boundary
values of the grade input.
Enter -1 for
each score
Grade Displayed is
F
Testing the upper level boundary
values of the grade input.
Enter 100 for
each score
Grade Displayed is
A
Testing the upper level boundary
values of the grade input.
Enter 101 for
each score
Grade Displayed is
A
Test the course name detects course
entered in standard mode.
Enter IT355 for
each course
Program runs
without any
problems.
Test the course name detects course
entered in standard mode.
Enter AABBCC
for each course
Error message
denoting wrong
course format.
Enter only one grade.
Enter score 98
for the first
course.
Grade Displayed is
A
2
3
Upper Boundary
Value Analysis
Cause Effect
Analysis
Enter two grades.
Enter three grades.
Enter four grades.
4
Equivalence
Partitioning
Testing values from 91 until 100 with
equivalent number 95 to get A.
Testing values from 81 until 90 with
equivalent number 85 to get B.
Testing values from 71 until 80 with
equivalent number 75 to get C.
Enter score 78
for the first
course and 85
for second.
Enter score 98
for the first
course, 65 for
second, 78 for
third.
Enter score 98
for the first
course, 65 for
second, 78 for
third and 45 for
the fourth.
Grade Displayed is
B
Grade Displayed is
B
Grade Displayed is
C
Enter 95 in
each course
Grade Displayed is
A
Enter 85 in
each course
Grade Displayed is
B
Enter 75 in
each course
Grade Displayed is
C
Test
Result
Status
Testing values from 61 until 70 with
equivalent number 65 to get D.
Enter 65 in
each course
Grade Displayed is
D
Enter 55 in
each course
Grade Displayed is
F
Testing the grade input for nonnumerical characters
Enter A, B, C, D,
E
Error message
indicating wrong
input
Testing the grade input for and blank
space.
Do not enter
anything and
press submit
Error message
indicating no input
was entered
Test the condition in line 66 of the
code.
Set GPA to 91,
95, 100
The grade variable
should be set to A
each time.
Test the condition in line 73 of the
code.
Set GPA to 81,
85, 90
The grade variable
should be set to B
each time.
Test the condition in line 80 of the
code.
Set GPA to 71,
75, 80
The grade variable
should be set to C
each time.
Test the condition in line 86 of the
code.
Set GPA to 61,
65, 70
The grade variable
should be set to D
each time.
Test the default condition in line 95
of the code.
Set GPA to 0,
25, 60
The grade variable
should be set to F
each time.
Testing for false case in line 66.
Set GPA to 95
The grade should
remain blank
Set GPA to 85
The grade should
remain blank
Set GPA to 75
The grade should
remain blank
Testing for false case in line 86.
Set GPA to 65
The grade should
remain blank
Testing for true case in line 66.
Set GPA to 95
Testing for true case in line 73.
Set GPA to 85
The grade should
remain blank
Set GPA to 75
The grade should
remain blank
Testing values 60 and below with
equivalent number 55 to get F.
5
6
7
Error Guessing
Conditional
Coverage
False Decision
Coverage
Testing for false case in line 73.
Testing for false case in line 80.
8
True Decision
Coverage
Testing for true case in line 80.
The grade should
remain blank
9
10
Logic Coverage
Multiple Condition
Coverage
The grade should
remain blank
Testing for true case in line 86.
Set GPA to 65
Test the calculation for sum and GPA
in lines 60 and 63.
Set the value1,
value2, value3,
value4 and
value5 to 55.5
Sum = 277.5
GPA = 55.5
Test the program to see if it covers
cases beyond a GPA of 100 by setting
GPA to 101 before line 66.
Set GPA to 101
The grade should
remain blank
Test to see if GPA is calculated
correctly for one value.
Set value1 =
98.5
GPA = 98.5
Test to see if GPA is calculated
correctly for two values.
Test to see if GPA is calculated
correctly for three values.
Test to see if GPA is calculated
correctly for four values.
Test to see if GPA is calculated
correctly for five values.
Set value1 = 78,
value2 = 85.3
GPA = 81.95
Set value1 =
88.5, value2 =
67.8, value3 =
99
Set value1 =
100, value2 =
76.8, value3 =
50, value4 =
86.5
Set value1 = 98,
value2 = 33.5,
value3 = 0,
value4 = 100,
value5 = 99
GPA = 85.1
GPA = 78.33
GPA = 66.1
Download