You are on page 1of 43

School of Computer Science & Software Engineering

Bachelor of Computer Science (Digital Systems Security)

CSCI321- Project Unit Testing 23 February 2013

Group: SS12/4B Khoo Jun Xiang Ang Wencan Stephen Goh Kheng Siang Joel Lim Sing Hui Low Jia Hui 4000766 4194032 4187490 4185948 4186448
Jxkhoo001@mymail.sim.edu.sg Wsang003@mymail.sim.edu.sg Ksgoh007@mymail.sim.edu.sg Shlim035@mymail.sim.edu.sg Jhlow010@mymail.sim.edu.sg

Supervisor: Mr Sionggo Jappit Assessor: Mr Tan Kheng Teck

Unit Testing
Please note that during this phase of testing, the software might not be in its final build, hence there might be slight difference between some screenshots and the user interface.

Login
Empty Fields
(both fields are empty) Expected Outcome: Login button will be greyed out and cannot be click Result: Login button greyed out and cannot be click Test: Pass

Empty Field
(either field is empty) Expected Outcome: Login button will be greyed out and cannot be click Result: Login button greyed out and cannot be click Test: Pass

Incorrect Input
Expected Outcome: Login will fail and error message will be displayed Result: Login failed and error message is displayed. Test: Pass

Correct input
Expected Outcome: Login will succeed and will proceed to display Admin or User screen Result: Login succeeded. Test: Pass

Correct input
(Admin Screen)

Correct input
(User Screen)

Range No Fields Selected


Expected Outcome: Value Box is greyed out and unable to enter value and display error message Result: Value Box is greyed out and unable to enter value. Program displays error message, informing user that data is invalid Test: Pass

No Range Specified
Expected Outcome: Displays error message informing user that data is invalid Result: Program display error message, informing user that data is invalid Test: Pass

Invalid Range
(Lower Bound greater then Upper Bound) Expected Outcome: Displays error message informing user that data is invalid Result: Program display error message, informing user that data is invalid Test: Pass

Correct Input
(Set Range) Expected Outcome: Display message informing user that range is successfully created Result: Program display message, informing user that range is successfully stored Test: Pass

Application No Fields Selected


Expected Outcome: Displays error message informing user that data is invalid Result: Program displays error message, informing user that data is invalid Test: Pass

Invalid Input
Expected Outcome: Displays error message informing user that data is invalid Result: Program displays error message, informing user that data is invalid Test: Pass

No Table Selected
Expected Outcome: Displays error message informing user to select the table Result: Program displays error message, informing user to select the table Test: Pass

No Attribute Selected
Expected Outcome: displays error message informing user to select the attribute Result: Program displays error message, informing user to select the attribute Test: Pass

Correct Input
(Reading In of Application) Expected Outcome: Display message informing user that application is successfully read-in. lower boundary constraint value will be set to 2 Result: Program displays message, informing user that application is read-in lower boundary constraint value is set to 2 Test: Pass

Manage User (Create) Empty Password Field


Expected Outcome: Displays error message informing user to enter password Result: Program displays error message, informing user to enter password Test: Pass

Different Password
Expected Outcome: Displays error message informing user that the password is different Result: Program displays error message, informing user that the password is different Test: Pass

Correct Input
(Create User) Expected Outcome: Display message informing admin that the user is successfully created Result: Program displays message, informing admin that user has been created. Test: Pass

User Login
Expected Outcome: The user created will be able to login Result: The user created can successfully logged in Test: Pass

Manage User (Update) Empty Field


Expected Outcome: Displays error message informing user to tick the check boxes Result: Program displays error message, informing user to tick the check boxes Test: Pass

No Role Specified
Expected Outcome: Displays error message informing user to select a role Result: Program displays error message, informing user to select a role Test: Pass

No Password Specified
Expected Outcome: Displays error message informing user to enter password Result: Program displays error message, informing user to enter password Test: Pass

Password Mismatch
Expected Outcome: Displays error message informing user that password entered are not same Result: Program displays error message, informing user that password entered are not same Test: Pass

Correct Input
(Update User) Expected Outcome: Displays message informing user that user has successfully updated. The user is able to login to the program with the changes made Result: Program displays message, informing user that user has been updated. The user is able to login according with changes made Test: Pass

User Login
(old password) Expected Outcome: The user would not be able to login with the old password Result: The user failed to log in with the old password Test: Pass

User Login
(new role) Expected Outcome: The user would be able to access the admin privileges Result: The user is able to access the admin privileges

Test: Pass

Manage User (Delete) Invalid User Details


Expected Outcome: Deletes User and display a message Result: Program displays message, informing user that user has been deleted Test: Pass

User Login
(user deleted) Expected Outcome: The deleted user would not be able to log in Result: The deleted user is not able to log in Test: Pass

Manage Constraint (Create) No Fields Selected


Expected Outcome: Displays error message, informing user that data is invalid Result: Program displays error message, informing user that data is invalid Test: Pass

Invalid Input
(value exceeds safety limit) Expected Outcome: Displays error message, informing user that data is invalid Result: Program displays error message, informing user that data is invalid Test: Pass

Invalid Input
(Value not numeric) Expected Outcome: Displays error message informing user that data is invalid Result: Program displays error message, informing user that data is invalid Test: Pass

Constraint Already Exist


Expected Outcome: Displays error message informing user that constraint already exist Result: Program displays error message, informing user that constraint already exist Test: Pass

Correct Input
(Create Constraint) Expected Outcome: Display message informing user that the constraint has been successfully created Result: Program displays message, informing user that constraint has been created Test: Pass

Manage Constraint (Update) Empty Fields


Expected Outcome: Display error message informing user that data is invalid Result: Program displays error message, informing user that data is invalid Test: Pass

Improper Value
Expected Outcome: Display error message informing user that constraint value is too low and may cause inference attack Result: Program displays message, informing user that constraint value is too low and may cause inference attack Test: Pass

Improper Value
Expected Outcome: Display error message informing user that constraint value is too high and may affect report generation Result: Program displays message, informing user that constraint value is too high and may affect report generation Test: Pass

Correct Value
(Update Constraint) Expected Outcome: Display message informing user that constraint has successfully updated Result: Program displays message, informing user that constraint has been updated Test: Pass

Manage Constraint (Delete) Empty Fields


Expected Outcome: Displays error message informing user to select an application or constraint Result: Program displays error message, informing user to select an application or constraint Test: Pass

Correct Input
(Delete Constraint) Expected Outcome: Displays message informing user that the constraint has successfully deleted Result: Program displays message, informing user that constraint has been deleted Test: Pass

View Log Empty Fields


Expected Outcome: Displays error message informing that no record found Result: Program displays error message, informing user that no record is found Test: Pass

Invalid Input
(User does not exist) Expected Outcome: Displays error message informing user that no record is found Result: Program displays error message, informing user that user does not have any log record found Test: Pass

Valid Input
(Successful Log) Expected Outcome: Displays successful logs Result: Program displays successful logs Test: Pass

Valid Input
(Unsuccessful Log) Expected Outcome: Displays unsuccessful logs Result: Program displays unsuccessful logs Test: Pass

Manage Role (Create) Empty Fields


Expected Outcome: Displays error message informing user to enter a role name Result: Program displays error message, informing user to enter a role name Test: Pass

Role Name Already Exist


Expected Outcome: Displays error message informing user that role name already in used Result: Program displays error message, informing user that role name already in used Test: Pass

Application Not Selected


Expected Outcome: Displays error message informing user to select the application Result: Program displays error message, informing user to select the application Test: Pass

Correct Input
(Create Role) Expected Outcome: Displays message informing user that the role has successfully added Result: Program displays message, informing user that the role has successfully added Test: Pass

Manage Role (Update) Empty Fields


Expected Outcome: Displays error message informing user to enter a role name Result: Program displays error message, informing user to enter a role name Test: Pass

Application Not Selected


Expected Outcome: Displays error message informing user to select the application Result: Program displays error message, informing user to select the application Test: Pass

Correct Input
(Update Role) Expected Outcome: Displays message informing user that the role has successfully updated Result: Program displays message, informing user that the role has successfully updated Test: Pass

Manage Role (Delete) Empty Fields


Expected Outcome: Displays error message informing user to enter a role name Result: Program displays error message, informing user to enter a role name Test: Pass

Correct Input
(Delete Role) Expected Outcome: Displays message informing user that the role has successfully deleted Result: Program displays message, informing user that the role has successfully deleted Test: Pass

Create Report Empty Field


Expected Outcome: Displays error message informing user that no function or attributes are selected Result: Program displays error message, informing user that no function and attributes are selected Test: Pass

Value out of range


Expected Outcome: Displays error message informing user that the value is out of range Result: Program displays error message, informing user that the value is out of range Test: Pass

Multiple Table (Cross / Natural Join)


Expected Outcome: Display Join option in a new pop up window Result: Program display Join option in a new pop up window and inform user join recorded successfully after user choose a join Test: Pass

Multiple Table (Inner / Outer Join)


Expected Outcome: Display Join option in a new pop up window Result: Program display Join option in a new pop up window and inform user join recorded successfully after user choose a join Test: Pass

Correct Input
Expected Outcome: Displays SQL queries at the textbox below Result: Program displays SQL queries at the below textbox Test: Pass

Invalid Input
Expected Outcome: Displays error message to inform the user that the query violates the constraints and no result is returned Result: Program displays error message to inform the user that the query violates the constraints and no result is returned Test: Pass

Valid Input
Expected Outcome: Displays report for the SQL queries made in a popup window and user can choose to generate the report Result: Program displays report for the SQL queries made in a popup window and user can choose to generate the report Test: Pass

Log Files
Expected Outcome: All the successful and unsuccessful queries would be logged in the respective log files Result: All the successful and unsuccessful queries are logged in the respective log files Test: Pass

View Report Incorrect Owner


Expected Outcome: Displays error message to inform the user that the report cannot be deleted Result: Program displays error message to inform the user that only the owner can delete the report Test: Pass

Correct Owner
(Delete report)
Expected Outcome: Report successfully deleted Result: Report is successfully deleted Test: Pass

Correct Owner
(View report)
Expected Outcome: Report opens in a new popup window Result: Report opens in a new popup window Test: Pass

Correct Owner
(Export report)
Expected Outcome: Textbox appear for user to enter the report name and a dropdown to select the format to export Result: Textbox appeared for user to enter the report name and a dropdown to select the format to export Test: Pass

Export Report
(.txt format)
Expected Outcome: Report exported to a text file Result: Report exported to a text file Test: Pass

Export Report
(excel format)
Expected Outcome: Report exported to an excel file Result: Report exported to an excel file Test: Pass

You might also like