June 26, 2017

Test Case Design

Introduction

Hello all,

In this blog we will describe about our software testing methods such as White Box Testing and Black Box Testing.

Black Box Testing:

Black Box Testing is also known as functional testing. Well it is software testing technique whereby the tester doesn’t know the internal workings of the item being tested. It means that in a black box test on a software design the tester only knows the inputs and what the expected results should be. Software tester doesn’t ever inspect the programming code and doesn’t require any further knowledge of the program other than its specifications. There are some benefits of this kind of software testing: The test is done from the viewpoint of the user, not the designer The tester doesn’t require knowledge of any special programming languages The test is impartial because the designer and the tester are independent of each other Test cases can be designed as soon as the specifications are complete

black box

Functional Requirement 1:

As an user I should be able to add NOTES for each activity so that I have more information about an activity that I perform.

Testcase:

Title: Additional Notes Description: Once the activities are entered, user should be able to add some additional notes to the activities for the future reference.

Test Process:

  1. Open the application
  2. Navigate to create new activities.
  3. Click on notes.

Expected Results:

  1. Notes will be added succesfully along with the activity.
  2. It can be verified by accessing History.

Functional Requirement 2:

As an user I should be able to have a clear button at the end of activity so that I can clear all the texts which i have entered incorrectly, at once.

Testcase:

Title: Clear unwanted information. Description: While creating a new activity if I change my mind in between, then I should be able to clear all the text fields. Precondition: User must have entered some data.

Test Process:

  1. Open application
  2. Navigate to Enter New Activity
  3. Enter Unwanted information
  4. Kill the clear button.

Expected Results:

  1. Cleared data should not be saved in Database.
  2. Data should also not be appeared in history overview.

Functional Requirement 3:

As an user I should be able to see the list of activities which I performed during last week, so I can plan other activities accordingly.

Test case:

Title: History of activities. Description: History should present list of activities which have been performed last week. Preconditions: At least user must have performed some activities during previous week.

Test Process:

  1. Open application.
  2. User must have add some activities
  3. Search list of activities according to user’s wish.

Expected Result:

It should be visible at History console.

Functional Requirement 4:

As a user while entering new activity, I should have a place to enter details like title of my activity, category, date, time etc. so that I have a clear idea of what I am doing.

Test Case:

Title: Details of the activity. Description: User should be able to enter fields such as category, Start and End time, Date and Notes.

Test Process:

  1. Open the application.
  2. Navigate to the new activities.
  3. Enter Title of the activity.
  4. Enter Category of the activity.
  5. Enter date of the activity.
  6. Enter Start and End time of the activity.
  7. Enter Notes if there are any.
  8. Click on Add button.

Expected Results:

  1. It should be saved in database.
  2. The saved activity should be visible in the History console.

Functional Requirement 5:

As a user I should be able to explicitly customize starting and ending time of the day. So that I can define my day.

Test case:

Title: Defining Day. Description: As users may have different start and end time of the day, so the application will allow user to explicitly set start and end time of the day.

Test Process:

  1. Open the application.
  2. Navigate to Settings.
  3. Enter start time.
  4. Enter end time.
  5. Press the set button.

Expected result:

While entering the new activity , if user check mark whole day, that activity will be assigned the time slot which has been defined by user in the settings.

White Box Testing:

black box

It is basically done by developers. Developers after completing the coding, they check each and every line of code is working properly or not. Here code base is visible. Hence it is called WBT. This can be done in the following ways:

Unit testing,

Path testing,

Predicate testing,

Loop testing,

Testing carried out from memory point of view,

Testing carried out from performance point of view.

Unit testing, testing carried out from memory and performance point of view can be done in both the ways i.e manually and using automation tools.

Here are our five white box test cases

Clear Button

clear button code

clear button path

Here, We can see that we have only two paths

Path 1 - {1, 2, 3-6, 7, 30}
Path 2 - {8-28, 29, 30}

Add Notes

code add note

path add note

There is only one Path

Path - {1,2-6,7, 17, 23, 24, 25, 26}

Create New Activity

Code new activity

path new activity

Here, We can see that we have only four path

path 1 - {1,2-16,17,18,19,20-23,31}
path 2 - {1,2-16,17,18,19,20-23,24,17,18,19,20-23,31}
path 3 - {1,2-16,17,18,19,20-23,20-23,31}
path 4 - {1,2-16,17,18,19,33,17,18,19,20-23,31}

Add Time to Activity

Code add time

path add time

Here, We can see that we have only four path

path 1 - {1,8,9-18,19,36}
path 2 - {23,36}
path 3 - {26,36}
path 4 - {30,36}

Add User Defined Category

Code new category Code new category

path new categoty

Here, We can see that we have only two path

path 1 - {1,3-23,24,31,32,47,59}
path 2 - {1,3-23,24,31,32,47,63,65}

Summary of Changes

There are no changes in the project objective or in any of the requirements.

Thank You