Вы находитесь на странице: 1из 16

Copyright IBM Corporation 2006

Disclaimer
(Optional location for any required disclaimer copy.
To set disclaimer, or delete, go to View | Master | Slide Master)
IBM Global Business Services
Course Title
Unit Test Plan - Reporting
BI Development Toolkit
IBM Global Business Services
Copyright IBM Corporation 2006 Presentation Title | IBM Internal Use | Document ID | 10/1/2014 2
Module Objectives
At the completion of this chapter
you should be able to:
Understand the approach of
unit testing that is to be used
to verify that each particular
piece of code that has been
written performs the function
that it is designed to do .
IBM Global Business Services
Copyright IBM Corporation 2006 Presentation Title | IBM Internal Use | Document ID | 10/1/2014 3
Unit Test Plan - Reporting : Agenda
Topic 1 : Introduction
Topic 2 : Explanation of Unit testing
Topic 3 : Unit Test Techniques


IBM Global Business Services
Copyright IBM Corporation 2006 Presentation Title | IBM Internal Use | Document ID | 10/1/2014 4
Detailed Process Flow Diagram
Functional
Specification
Estimate
Sign Off
Detailed
Design
Build
Functional
Specification
Estimate Estimate
Sign Off Sign Off
Detailed
Design
Technical
Design
Build Develop
Deployment Build & Unit Test Design ( Macro & Micro) Solution Outline
QA Checkpoints -
- Onsite/Offshore
Workshop Workshop
Issue Issue
Issue
Resolution
Issue
Resolution
Completed FS Completed FS
- Offshore
- Onsite
Delivery Plan Delivery Plan
Estimation
OK ?
Estimation
OK ?
Yes No
Workshop Workshop
Issue Issue
Issue
Resolution
Issue
Resolution
Completed FS Completed FS
- Offshore
- Onsite
Delivery Plan Delivery Plan
Estimation
OK ?
Estimation
OK ?
Yes No
Estimation and
Functional
Spec Review
Technical
Design
Technical
Design
Technical
Design
Approval
Technical
Design
Approval
Onsite
Testing
Onsite
Testing
TPR/SCR
Logging
TPR/SCR
Logging
Issues
Development
Complete
Development
Complete
Acceptance
Send for
Onsite
Acceptance
Send for
Onsite
Acceptance Coding
OK ?
Coding
OK ?
Yes
Peer


Review
Technical
Design
Technical
Design
QA Technical
Design
Technical
Design
Approval
Technical
Design
Approval
Onsite
Testing
Onsite
Testing
Onsite
Testing
Onsite
Testing

TPR/SCR
Logging
TPR/SCR
Logging
Issues
Development
Complete
Development
Complete
Acceptance
Send for
Onsite
Acceptance
Send for
Onsite
Acceptance Coding
OK ?
Coding
OK ?
Yes
No
Rework
Required
Coding and
Unit Testing by
Developer
Signoff by
Team Lead
Peer

Review
Technical
Specification
Unit Test Plan
Offshore
Knowledge
Transfer

(UAT/System Test/
IntegrationTest
IBM Global Business Services
Copyright IBM Corporation 2006 | 10/1/2014 5


The development process flow has the following key
elements:

Functional Specification (FS)
Issue Clarification
Effort Estimation
Technical Specification
Coding and Testing




Key Elements
IBM Global Business Services
Copyright IBM Corporation 2006 | 10/1/2014 6















Introduction

Once the coding part is over, unit testing is carried out. It validates the actual
output against the expected output.


The unit testing approach used is that each routine, method, function or class of
the application being coded has its own unit test plan.

Unit Testing Approach

IBM Global Business Services
Copyright IBM Corporation 2006 | 10/1/2014 7















Explanation of Unit Testing
What is it?

Unit testing is part of the software development life cycle that ensures that each
piece of code that has been written performs the function that it is designed
to do.

Who does it?

The developer who wrote the code: plans, writes and executes the unit test.

Why do it?

Unit testing is performed to improve the overall quality of the software that is
passed on to the testing team and then to the client. This is done by
reducing the cost of defects, as one is eliminating them while the
application is still being developed, rather than waiting until the system
testing phase.
IBM Global Business Services
Copyright IBM Corporation 2006 Presentation Title | IBM Internal Use | Document ID | 10/1/2014 8
Points to be considered for Unit Testing
Step Overview:
This shows the key points to be considered while doing Unit Test
Key Activities:

Test as you go
Functional Testing
Boundary Value Testing
Termination of the program
Outputs
Algorithms and Computations
Interaction
Transactions


Outputs

Record test Results
Verify that actual result
matches expected
result
Inputs
Assume you will find
errors
Own Checklist of
Common
Errors
Use Data most likely to
cause errors
Use Data that make
Hand-Checks easier.
Make sure all paths in
code is covered
Plan your tests

Roles

Developer
Samples


IBM Global Business Services
Copyright IBM Corporation 2006 | 10/1/2014 9
















Type of things to Test for (Key Activities )
Assume you will find errors
A successful unit test is one that finds an error. If you write unit test
plans based on your assumption that all your code is perfect you will
find it hard to find any errors in your code.

Own Checklist of Common Errors
Create a checklist of your common errors .This checklist is your own
personal list of errors that you generate or particular functions you find
hard to implement. This will help you from continually introducing these
types of defects into code. Include these tests in any unit test you create
where applicable

Use Data most likely to cause errors
When writing your test plans include data that is most likely to cause
an
error. There is no point testing using data that will always pass.
IBM Global Business Services
Copyright IBM Corporation 2006 | 10/1/2014 10
















Type of things to Test for (Key Activities )
Use Data that make Hand-Checks easier
When executing a test that causes an error, it is a lot easier to Hand-
Check the function if the data you are using is easy to manipulate.
For example if you are doing some calculations on a number like
986326.34,you may more likely to make an operation error on that
number rather than a number such as 90000.00.

Make sure all paths in code is covered
When writing unit test plans make sure all paths in the code are
covered
in at least one test. There is no need to execute the same test with all
possible values if the code will always return the same result.

Plan your tests
Before coding a piece of functionality or fixing a defect, plan your unit
test. This will greatly improve the quality of your change as you are
already thinking about what could make this fail. See the Unit Testing
Plan Template for the format to follow.
IBM Global Business Services
Copyright IBM Corporation 2006 | 10/1/2014 11
















Type of things to Test for (Key Activities )
Functional Testing
Does the piece of code functionally perform the task it is designed to
do?
Boundary Value Test
What are the minimum, maximum values for the function, will the
function accept strange characters, reserved SQL characters, alpha
and numeric values? What happens if they are not within these
boundaries?

Termination
What happens in the normal termination of the function? What about
an abnormal termination of the function? Will the application continue
or will an error occur. Is the error trapped?

Outputs
What are the expected outputs of the function? Where do they go,
what else uses them, what happens if the output is nothing? What
happens if the output cannot be passed to the next function? I.e. The
database was unavailable when attempting to write to it.
IBM Global Business Services
Copyright IBM Corporation 2006 | 10/1/2014 12
















Type of things to Test for (Key Activities )
Algorithms and Computations
Do all the algorithms and computations work, what happens if the
wrong values are passed to them, are the variables stored as correct
types i.e. will the result exceed 32267 (integer)

Interaction
What other modules/functions does this interact with? Will those be
affected by the change?

Transactions
What type of transactions will occur? What will happen if a single
transaction fails, is interrupted or succeeds? Are the transactions
events driven, system initiated, user driven, or time driven?
IBM Global Business Services
Copyright IBM Corporation 2006 | 10/1/2014 13
Example of a UTP in Reporting
UTP Consist of 3 sheet
Unit Test Plan-> Unit Test Condition->Report Snapshot
Unit Test Plan : (Sample )
Verify that the data is plotted properly on the chart for different combination
of management organization unit and reporting month.

IBM Global Business Services
Copyright IBM Corporation 2006 | 10/1/2014 14
Contd..
Unit Test Condition
Has explanation of Test Description, Expected result, Actual Result,
Report Snapshot reference no. ,Test Status.
Test Condition Sample :
Expected Result : Verify that the chart is displayed corrrectly with
"Restructured Flow on Y-axis and Reporting Month on X-axis. Product
should be displayed in the series.
Actual Result : "Restructured Flow" is plotted on Y axis, Reporting Month
is on X axis and Product( Segment as per tech spec ) is plotted in series
Test Status : Pass


IBM Global Business Services
Copyright IBM Corporation 2006 | 10/1/2014 15
Contd..
The Snapshot below shows Test description , expected results ,
actual results etc


IBM Global Business Services
Copyright IBM Corporation 2006 | 10/1/2014 16
Contd..
Report Snapshot
Results are embedded within the Report Snapshot sheet of UTP

Вам также может понравиться