You are on page 1of 33

TESTING

By Deepika Mohadikar(04713504411) Rubal Bansal(06513504411)

What is Testing?

The process of executing a program with the intent of finding errors. The purpose of the final testing activities is then only to ensure a quality certificate for the product, which is called certification to distinguish it from other type of quality activity.

Types of Test Activities


Verification checks whether result agrees with the specification. For eg: Are we building the system correctly? Validation checks whether the result really is what the orderer actually wanted. For eg: Are we building the correct system?

Basic definitions

A failure is an unacceptable behaviour exhibited by a system n The frequency of failures measures the reliability n An important design objective is to achieve a very low failure rate and hence high reliability. n A failure can result from a violation of an explicit or implicit requirement A defect is a flaw in any aspect of the system that contributes, or may potentially contribute, to the occurrence of one or more failures n It might take several defects to cause a particular failure An error is a slip-up or inappropriate decision by a software developer that leads to the introduction of a defect

Purpose of Testing

The purpose of testing is to find faults. Testing is thus a destructive process to some extent; we must show that something incorrect. Well known phenomenon that when you correct detected faults, you introduce new faults into the system When faults has been corrected,you may have to reset your software

Test types

Testing levels
Unit testing means that one and only one unit is tested as such. In OOSE, the unit is typically a class, block Integration testing involves testing with the purpose of verifying that the units are working together correctly. System Testing concerns testing the entire system or the application as such. This takes an end-user view of the system and the test cases perform typical end-user actions.

Acceptance Testing

Goal: Demonstrate system is ready for operational use


Choice

of tests is made by client/sponsor Many tests can be taken from integration testing Acceptance test is performed by the client, not by the developer.

Majority of all bugs in software is typically found by the client after the system is in use, not by the developers or testers. Therefore two kinds of additional tests:

Types of Acceptance Testing

Alpha test:

Sponsor uses the software at the developers site. Software used in a controlled setting, with the developer always ready to fix bugs.

Beta test:

Conducted at sponsors site (developer is not present) Software gets a realistic workout in target environ- ment Potential customer might get discouraged

Testing Techniques A regression test is done when u have made changes in the system, for example corrected a fault, and the tests purpose is to verify that the old functionality remains. This test is very important, but rather tiring and time consuming. Testing focuses The Operation test is the most common system test. The system is used in the intended manner . Full scale test (stress testing)means that we run the system on its maximum scale. All the parameters of the system approach their limit values Negative test , the system is intentionally and systematically used in an incorrect manner.

Input determined by...


requirements

Black-, Gray-, & White-box Testing

Result
Black box Actual output compared with required output

requirements & key design elements

Gray box

As for black- and white box testing

White box design elements Confirmation of expected behavior

Black Box/ Functional Testing

Testers provide the system with inputs and observe the outputs
They
n The

can see none of:

source code n The internal data n Any of the design documentation describing the systems internals

Unit test cases can be reused, but in end user oriented new test cases have to be developed as well.

Glass Box

Also called white-box or structural testing Testers have access to the system design
They

can

n Examine

the design documents n View the code n Observe at run time the steps taken by algorithms and their internal data
Individual

programmers often informally employ glassbox testing to verify their own code

Gray Box

A black-box tester is unaware of the internal structure of the application to be tested, while a white-box tester knows the internal structure of the application. A gray-box tester partially knows the internal structure, which includes access to the documentation of internal data structures as well as the algorithms used. Gray-box testers require both high-level and detailed documents describing the application, which they collect in order to define test cases.

Unit Testing

A unit test is the lowest level of testing and it is normally done by the developer himself, mainly due to costs. Unit tests are performed for classes, blocks. The larger the unit, the more formal the testing will be.

Unit Testing consists of


1. 2. 3.

Specification testing(Blackbox testing) State based testing Structural testing(White Testing)

State Based testing

It tests the interaction between the operations of a class by monitoring the changes that takes place in an object attributes Testing only one operation in isolation is not enough to test a unit.

Ex : State Matrix
This matrix indicates all the states that can be adopted by the unit and all the requests that the unit is expected to receive in various states. Advantage: Draws attention of Designer to state combinations(neglected during design)
Stimulus 1 2 3 4 S0 ok S1 ok fail ok S2 ok Slow checking S3 s4 fail Wrong response ok

Structure Testing

Essentially the same as white box testing. Goal: Cover all paths in the system design Exercise all input and output parameters of each component.

Exercise all components and all calls (each component is called at least once and every component is called by all possible callers.)

What is integration testing ?


Unit testing is testing modules individually Then modules need to be put together to construct the complete system v Objective of system integration testing (SIT) to build a working version of the system putting modules together ensuring that the additional modules work as expected without disturbing the functionalities of the modules already put together

What is integration testing ?


Integration testing is said to be complete when the system is fully integrated together All the test cases have been executed All the severe and moderated defects found have been fixed

System Integration Techniques


There are two groups of software integration strategies: - Non Incremental software integration - Incremental software integration Common approaches for system integration testing 1.Incremental software integration Top-down Bottom-up Sandwich 2.Non incremental software integration Big-bang

Components for Integration Testing


When testing a module in isolation Called modules need to be replaced Tested module needs to be called

Drivers A driver is a method used to call a module that is being tested. Sends values to module under test. Collects return values Stubs A stub is a module used specifically for testing that replaces a called module.

Top-down Integration
Incremental strategy 1.Test high-level modules, then 2.Modules called until lowest level modules

completed means unit tested

Top-down Integration
Advantages
o o o o

Fault localization easier Few or no drivers needed Different order of testing/implementation possible Major design flaws found first

- in logic modules on top of the hierarchy Dis-advantages


o o

Need lot of stubs Potentially reusable modules (in bottom of the hierarchy)

can be inadequately tested

Bottom-up Integration
1.Test low-level modules, then 2.Modules calling them until highest level module

Bottom-up Integration
Advantages Fault localization easier (than big-bang) No need for stubs Reusable modules tested thoroughly Testing can be in parallel with implementation Dis-advantages Need of drivers High-level modules (that relate to the solution logic) tested in the last (and least)

Sandwich Integration

Combines top-down strategy with bottom-up strategy The system is view as having three layers
A target layer in the middle A layer above the target A layer below the target Testing converges at the target layer

How do you select the target layer if there are more than 3 layers?

Heuristic: Try to minimize the number of stubs and drivers

Sandwich Integration
B

Layer I C D Layer II

Test E up Bottom Layer Tests Test B, E, F Test F

Layer III

Test D,G Test G Test A,B,C, D Top Layer Tests Test A down

Test A, B, C, D, E, F, G

Big Bang Integration


Non-incremental strategy 1.Unit test each module in isolation 2.Integrate as a whole

Big Bang Integration


Advantages convenient for small systems Dis-advantages need driver and stubs for each module do not allow parallel development fault localization difficult

THANK YOU

You might also like