Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

AUTHENTICATION PROGRAM

This program validates the input username and password.


Use Case Main Steps:

1. The program takes as input a username and password.

2. Input validation on the username and password passes.


(Business Rules: Input Validation)
(Alternate Path A: The Input Validation Fails)

3. The program validates that the username exists in the database.


(Alternate Path B: The Username DOES NOT Exist in the database)

4. The program checks to see that the “Failed Attempt Counter” for this username is less than 5.
(Alternate Patch D: The “Failed Attempt Counter” in the database is 5.)

5. The program validates that the input password matches the password in the database for the username.
(Alternate Path C: The input Password DOES NOT match the password in the database)

6. The program resets the “Failed Attempt Counter” for this username in the database to ZERO.

7. The program returns “AUTHENTICATION SUCCESSFUL”

8. Use Case Ends.

Alternate Paths:
Alternate Path A: The Input Validation Fails
1. The program returns “INVALID DATA”
2. Use Case Ends

Alternate Path B: The Username DOES NOT Exist in the database


1. The program returns “INVALID USERNAME”
2. Use Case Ends

Alternate Path C: The input Password DOES NOT match the password in the database
1. The program increments the “Failed Attempt Counter” in the database for this username by 1.
2. The program validates that the “Failed Attempt Counter” in the database for this username is less than 5.
(Alternate Patch D: The “Failed Attempt Counter” in the database is 5.)
3. The program returns “INVALID PASSWORD”
4. Use Case Ends

Alternate Patch D: The “Failed Attempt Counter” in the database is 5


1. The program returns “USERNAME BLOCKED”
2. Use Case Ends

Business Rules:
Input Validation:
 The username and password fields should NOT be blank.
 The username input should NOT have special characters.

Exercise for the Day:


1. Based on the “Authentication Program” write test cases to comprehensively test the program.
2. Use the test case structure and format reviewed in the previous section

You might also like