dss 12 s4 03 unit testing

Upload: jxkhoo001

Post on 04-Apr-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    1/43

    School of Computer Science & Software EngineeringBachelor of Computer Science (Digital Systems Security)

    CSCI321- Project

    Unit Testing 23 February 2013

    Group: SS12/4B

    Khoo Jun Xiang 4000766 [email protected]

    Ang Wencan Stephen 4194032 [email protected]

    Goh Kheng Siang Joel 4187490 [email protected]

    Lim Sing Hui 4185948 [email protected]

    Low Jia Hui 4186448 [email protected]

    Supervisor: Mr Sionggo Jappit

    Assessor: Mr Tan Kheng Teck

    mailto:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]
  • 7/29/2019 DSS 12 S4 03 Unit Testing

    2/43

    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

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    3/43

    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

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    4/43

    Correct input(Admin Screen)

    Correct input(User Screen)

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    5/43

    Range

    No Fields Selected

    Expected Outcome:

    Value Box is greyed out and unableto enter value and display errormessage

    Result:

    Value Box is greyed out

    and unable to enter value. Programdisplays error message, informinguser that data is invalid

    Test: Pass

    No Range Specified

    Expected Outcome:Displays error message informinguser that data is invalid

    Result:

    Program display error message,informing user that data is invalid

    Test: Pass

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    6/43

    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 issuccessfully stored

    Test: Pass

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    7/43

    Application

    No Fields Selected

    Expected Outcome:

    Displays error message informinguser 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

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    8/43

    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

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    9/43

    Correct Input(Reading In of Application)

    Expected Outcome:

    Display message informing userthat application is successfully

    read-in.

    lower boundary constraint valuewill be set to 2

    Result:

    Program displays message,

    informing user that application isread-in

    lower boundary constraint value isset to 2

    Test: Pass

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    10/43

    Manage User (Create)

    Empty Password Field

    Expected Outcome:

    Displays error message informinguser 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 isdifferent

    Test: Pass

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    11/43

    Correct Input(Create User)

    Expected Outcome:

    Display message informing adminthat the user is successfully

    created

    Result:Program displays message,

    informing admin that user hasbeen created.

    Test: Pass

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    12/43

    User Login

    Expected Outcome:The user created will be able to

    login

    Result:The user created can

    successfully logged in

    Test: Pass

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    13/43

    Manage User (Update)

    Empty Field

    Expected Outcome:

    Displays error message informinguser 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

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    14/43

    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 passwordentered are not same

    Test: Pass

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    15/43

    Correct Input(Update User)

    Expected Outcome:

    Displays message informing userthat user has successfullyupdated. The user is able to login

    to the program with the changes

    made

    Result:Program displays message,

    informing userthat user has beenupdated. The user is able to login

    according with changes made

    Test: Pass

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    16/43

    User Login(old password)

    Expected Outcome:

    The user would not be able tologin with the old password

    Result:

    The user failed to log in with theold password

    Test: Pass

    User Login(new role)

    Expected Outcome:

    The user would be able to accessthe admin privileges

    Result:

    The user is able to access theadmin privileges

    Test: Pass

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    17/43

    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 ableto log in

    Result:The deleted user is not able to log

    in

    Test: Pass

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    18/43

    Manage Constraint (Create)

    No Fields Selected

    Expected Outcome:Displays error message, informinguser 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

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    19/43

    Invalid Input(Value not numeric)

    Expected Outcome:

    Displays error message informinguser 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 informinguser that constraint already exist

    Result:

    Program displays error message,informing user that constraint

    already exist

    Test: Pass

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    20/43

    Correct Input(Create Constraint)

    Expected Outcome:

    Display message informing userthat the constraint has been

    successfully created

    Result:Program displays message,

    informing user that constraint hasbeen created

    Test: Pass

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    21/43

    Manage Constraint (Update)

    Empty Fields

    Expected Outcome:

    Display error message informinguser that data is invalid

    Result: Program displays errormessage, informing user that data

    is invalid

    Test: Pass

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    22/43

    Improper Value

    Expected Outcome:Display error message informing

    user that constraint value is too lowand may cause inference attack

    Result:

    Program displays message,informing user that constraint value

    is too low and may cause inferenceattack

    Test: Pass

    Improper Value

    Expected Outcome:

    Display error message informing

    user that constraint value is toohigh and may affect reportgeneration

    Result:Program displays message,

    informing user that constraint valueis too high and may affect reportgeneration

    Test: Pass

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    23/43

    Correct Value(Update Constraint)

    Expected Outcome:

    Display message informing userthat constraint has successfully

    updated

    Result:Program displays message,

    informing user that constraint hasbeen updated

    Test: Pass

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    24/43

    Manage Constraint (Delete)

    Empty Fields

    Expected Outcome:

    Displays error message informinguser to select an application orconstraint

    Result:Program displays error message,

    informing user to select anapplication or constraint

    Test: Pass

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    25/43

    Correct Input(Delete Constraint)

    Expected Outcome:

    Displays message informing userthat the constraint has successfullydeleted

    Result:Program displays message,

    informing user that constraint hasbeen deleted

    Test: Pass

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    26/43

    View Log

    Empty Fields

    Expected Outcome:

    Displays error message informingthat 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 informinguser that no record is found

    Result:

    Program displays error message,informing user that user does nothave any log record found

    Test: Pass

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    27/43

    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

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    28/43

    Manage Role (Create)

    Empty Fields

    Expected Outcome:

    Displays error message informinguser 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 informinguser that role name already in used

    Result:Program displays error message,

    informing user that role namealready in used

    Test: Pass

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    29/43

    Application Not Selected

    Expected Outcome:Displays error message informing

    user to select the application

    Result:

    Program displays error message,

    informing user to select theapplication

    Test: Pass

    Correct Input(Create Role)

    Expected Outcome:

    Displays message informing userthat the role has successfully

    added

    Result:

    Program displays message,informing user that the role hassuccessfully added

    Test: Pass

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    30/43

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    31/43

    Manage Role (Update)

    Empty Fields

    Expected Outcome:

    Displays error message informinguser 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 informinguser to select the application

    Result:Program displays error message,

    informing user to select the

    application

    Test: Pass

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    32/43

    Correct Input(Update Role)

    Expected Outcome:

    Displays message informing userthat the role has successfullyupdated

    Result:Program displays message,

    informing user that the role hassuccessfully updated

    Test: Pass

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    33/43

    Manage Role (Delete)

    Empty Fields

    Expected Outcome:

    Displays error messageinforming user to enter a rolename

    Result:

    Program displays error message,

    informing user to enter a rolename

    Test: Pass

    Correct Input(Delete Role)

    Expected Outcome:Displays message informing user

    that the role has successfullydeleted

    Result:Program displays message,informing user that the role has

    successfully deleted

    Test: Pass

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    34/43

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    35/43

    Create Report

    Empty Field

    Expected Outcome:

    Displays error message informing userthat 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

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    36/43

    Multiple Table

    (Cross / Natural Join)

    Expected Outcome:

    Display Join option in a new pop upwindow

    Result:

    Program display Join option in a new

    pop up window and inform user joinrecorded successfully after user choose a

    join

    Test: Pass

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    37/43

    Multiple Table

    (Inner / OuterJoin)

    Expected Outcome:

    Display Join option in a new pop upwindow

    Result:

    Program display Join option in a new

    pop up window and inform user joinrecorded successfully after user choose a

    join

    Test: Pass

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    38/43

    Correct Input

    Expected Outcome:Displays SQL queries at the textbox

    below

    Result:Program displays SQL queries at the

    below textbox

    Test: Pass

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    39/43

    Invalid Input

    Expected Outcome:Displays error message to inform the

    user that the query violates theconstraints and no result is returned

    Result:

    Program displays error message toinform the user that the query violates

    the constraints and no result is returned

    Test: Pass

    Valid Input

    Expected Outcome:

    Displays report for the SQL queriesmade 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 anduser can choose to generate the report

    Test: Pass

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    40/43

    Log Files

    Expected Outcome:All the successful and unsuccessful

    queries would be logged in the respectivelog files

    Result:

    All the successful and unsuccessfulqueries are logged in the respective log

    files

    Test: Pass

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    41/43

    View Report

    Incorrect Owner

    Expected Outcome:

    Displays error message to inform the userthat 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

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    42/43

    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 thereport name and a dropdown to select the

    format to export

    Test: Pass

  • 7/29/2019 DSS 12 S4 03 Unit Testing

    43/43

    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