Computer
Science and Software Engineering 371
Software
Requirements and Specification
Fall
2005
Exam
2 Review Solution
1.
(a) Since Feature 2 was a
high-risk proposition, it is likely that Feature 3 was chosen in order to
increase the possibility of getting one important feature implemented.
(b) The
description of Feature 5 (New project wizard) sounds like it could be dependent
on Feature 3 (Ability to clone a project), Feature 5 would have to be done
first.
2. Consider the use case below.
|
Name
of Use Case |
ATM
Checking Withdrawal |
|
Brief
Description |
Withdraw
money from a checking account using an ATM |
|
Actor(s) |
User,
Bank database |
|
Basic
Flow |
1. The user
enters the amount of the withdrawal request within 60 seconds. 2. The ATM gives the user the desired amount
on money. |
|
Alternate
Flow(s) |
1. The user
does not provide an amount within 60 seconds, and is then prompted, asking if
more time is desired. There are two
possible outcomes: a. If the
user answers “yes”, step 1 starts again from the beginning b. If the
user answers “no” or does not respond within 60 more seconds, the withdrawal
is cancelled. 2. If the
user enters an amount greater than the balance on that account, the user
prompted for a new amount (as in step 1). 3. The user presses
the cancel button instead of entering an amount, and the withdrawal is
cancelled. |
|
Pre-conditions |
The
user has already specified that withdrawal from their checking account is desired,
and the ATM screen is already prompting the user for an amount to withdraw. |
|
Post-conditions |
The
user received prompt asking if additional transactions are desired. |
|
Special requirements |
none |
Step 1: Identify the Use-Case Scenarios
Below is a depiction of the flow as shown in the textbook’s format; a state diagram could also be used.

Step 2: Identify the Test Cases
Each flow edge from the figure step 1 needs to be involved in at least one test case. Scenario 3 (where the user is asked for more time but declines, through either action or inaction) needs two test cases because of the two ways involved.
|
Test Case Id |
Scenario |
Description |
Expected Result |
|
1 |
1 |
User successfully withdraws money |
amount requested is paid in cash |
|
2 |
2 |
User takes too long to enter amount but asks for more
time |
user is asked for withdrawal amount again |
|
3 |
3 |
User takes too long to enter amount but answers
request for more time in the negative |
withdrawal request cancelled |
|
4 |
3 |
User takes too long to enter amount and also to
request for more time |
withdrawal request cancelled |
|
5 |
4 |
User asks for more money than in the bank account |
user is informed of the problem and asked for
withdrawal amount again |
|
6 |
5 |
User presses cancel button |
withdrawal request cancelled |
Step 3: Identify the Test Conditions
Step 4: Add Data Values to Complete the
Test Case
|
Test Case Id |
Scenario |
Description |
Condition: cancel button pressed |
Condition: time taken to enter
withdrawal amount |
Condition: amount requested <= account balance |
Condition: time taken to enter
response to request for more time |
Condition: response to request for
more time |
Expected Result |
|
1 |
1 |
User successfully withdraws money |
No |
<= 60 sec |
Yes |
N/A |
N/A |
amount requested is paid in cash |
|
2 |
2 |
User takes too long to enter amount but asks for more
time |
No |
> 60 sec |
N/A |
<= 60 sec |
Yes |
user is asked for withdrawal amount again |
|
3 |
3 |
User takes too long to enter amount but answers
request for more time in the negative |
No |
> 60 sec |
N/A |
<= 60 sec |
No |
withdrawal request cancelled |
|
4 |
3 |
User takes too long to enter amount and also to
request for more time |
No |
> 60 sec |
N/A |
> 60 sec |
N/A |
withdrawal request cancelled |
|
5 |
4 |
User asks for more money than in the bank account |
No |
<= 60 sec |
No |
N/A |
N/A |
user is informed of the problem and asked for
withdrawal amount again |
|
6 |
5 |
User presses cancel button |
Yes |
N/A |
N/A |
N/A |
N/A |
withdrawal request cancelled |
3. (a) A request for change should be submitted through the control change system mechanism. The change control board (CCB) should then decide whether or not to make the change, and if so, where the change should originate in the development artifacts.
(b) Approval of a new feature means that the vision document must be changed, which in turn changes the use cases, design, code and test cases.
4. For
agile requirements, test cases must be planned before coding. Testing is actually performed using an
automated tool.