You are on page 1of 5

College of Computer and Information Systems

Bachelor of Computer and Information Systems


Fall Semester 2017-18
SWE 411 Software Verification and Validation
Course Instructor: Dr.Vani V
Assignment 1:

Table of Contents
Exercise 1: Creating a template to document test cases............................................1
Exercise 2: Identifying Test cases using Boundary value analysis and Equivalence
partitioning..................................................................................................1
Exercise 3: Identifying test cases using logic coverage..............................................2
Exercise 4: Create a Defect Tracking Excel sheet....................................................3
Exerciset 5: Testing a program using the test cases and logging Test Results and Defects....4

Exercise 1: Creating a template to document test cases


Objective: To create a template using MS Excel to document test cases.

Problem Description: Create an Excel sheet with the columns shown below.

Sl Test case Test Pre- Expected Reference to Detailed


No name Procedure condition Result Design / Spec
Document

Table 1: Template for documenting test cases

Summary of this exercise: In this exercise, you have learnt


 How to create a template in Excel sheet to document test cases.

Exercise 2: Identifying Test cases using Boundary value analysis and


Equivalence partitioning
Objective: To identify and document test cases for a given functionality, using Boundary
value Analysis and Equivalence partitioning technique.
Problem Description: Consider the function below whose functionality is described in its
documentation.
/******************************************************************
* Method: computeInterestRate
* Description: Given the term of the deposit, computes and returns
* the interest rate. Both the parameters iNumberOfYears and
* iNumberOfMonths together form the term
*
* Criteria for Interest:
* Less than 3 months 1%
* 3 months to 5 months 3.5%
* 6 months to 11 months 4.5%
* 1 year to 1 year, 11 months 5.0%
* 2 years and above 5.5%
* PARAMETERS:
* int iNumberOfYears Number of years
* int iNumberOfMonths Number of months (if less than year).
* Can have values 1-11 only
*
* RETURNS: Appropriate Rate of Interest. -1.0 in case of error.
******************************************************************/

float computeInterestRate (int iNumberOfYears, int iNumberOfMonths) {


...
...
}

Step 1: Identify the test cases based on boundary value analysis and document them in the
Excel sheet created earlier.

Step 2: Identify the test cases based on Equivalence partitioning and document them in the
Excel sheet created earlier.

Summary of this exercise: In this exercise you have learnt:


 Creating a spreadsheet to document test cases
 Documenting test cases
 Identifying test cases using Boundary value analysis
 Identifying test cases using Equivalence partitioning

Exercise 3: Identifying test cases using logic coverage

Objective: To identify and document test cases using Logic coverage technique for the Bank
Teller User Interface of Global Commerce Bank given below.
Problem Statement: Consider the User Interface given below.

The screen has three operations of a teller in it. They are:


 Deposit
 Withdraw
 Balance Enquiry

When the Teller selects the option “Balance Enquiry”, the Amount field should get disabled.
In other cases (Deposit and Withdraw), the amount field is enabled. Should accept amounts
less than 10,000 USD only. Larger amounts results in a message “Unable to process. Amount
Limit crossed USD 10,000. Please contact the bank manager”

Summary of this exercise:


In this exercise we have learnt:
 Identifying test cases using Logic Coverage
 Identifying test cases for User Interface testing
 Documenting test cases

Exercise 4: Create a Defect Tracking Excel sheet

Objective: To create a Defect Tracking Excel sheet.

Problem Statement: Create a defect tracking excel sheet as shown in the diagram below.
Summary of this exercise:
In this exercise we have learnt:
 Creating a Defect Tracking Excel sheet

Exerciset 5: Testing a program using the test cases and logging Test
Results and Defects
Objective: To test code using test cases documented in earlier assignments and to log defects
into the Defect Tracking Excel sheet created earlier.

Problem Statement: code required (intrate.java).

Step 1: Create an empty project with name ‘intrate’

Step 2: Add the source code provided into the project.

Step 3: Compile the program. The program should compile with Zero errors and warnings.

Step 4: Open the Unit Test Plan Excel sheet containing the test cases identified using
Boundary value analysis and Equivalence partitioning. Add an additional column to the Excel
Sheet “Results”.

Step 5: Execute test cases one by one and compare if the expected result is the same as what
is documented in the Test Plan.

If the expected result is the same, mark the test case as “PASSED” in the “Results1” column.

If the expected result in the Test Plan is different from the result returned by the program:
 Mark the test case as “FAILED” in the “Results1” column
 Add an entry into the Defect Tracking Excel sheet
 The description of the defect in the Defect Tracking Excel sheet should contain full
details of the preconditions if any, inputs, output, the expected output and any other
information that will help a developer to debug and fix the defect.
Step 6: Execute all the test cases. Mark the test result for all the tests.

Summary of this exercise:


In this exercise we have learnt:
 Unit Testing according to the Test Plan
 Recording Test Results
 Logging defects

You might also like