Академический Документы
Профессиональный Документы
Культура Документы
7388345364 Aditi
Unit Tests, when integrated with build gives the quality of the build as well.
White Box Testing - used to test each one of those functions behaviour is
tested.
Gray Box Testing - Used to execute tests, risks and assessment methods.
WHITE BOX TESTING (also known as Clear Box Testing, Open
Box Testing, Glass Box Testing, Transparent Box Testing, Code-Based
Testing or Structural Testing) is a software testing method in which the
internal structure/design/implementation of the item being tested is
known to the tester. The tester chooses inputs to exercise paths through
the code and determines the appropriate outputs. Programming know-
how and the implementation knowledge is essential. White box testing is
testing beyond the user interface and into the nitty-gritty of a system.
This method is named so because the software program, in the eyes of
the tester, is like a white/transparent box; inside which one clearly sees.
Thus, structural testing is an approach where the tests are derived from the
knowledge of the software's structure or internal implementation
Definition by ISTQB
Example
A tester, usually a developer as well, studies the implementation code of
a certain field on a webpage, determines all legal (valid and invalid) AND
illegal inputs and verifies the outputs against the expected outcomes,
which is also determined by studying the implementation code.
White Box Testing is like the work of a mechanic who examines the
engine to see why the car is not moving.
Levels Applicable To
White Box Testing method is applicable to the following levels of software
testing:
Advantages
Testing can be commenced at an earlier stage. One need not wait
for the GUI to be available.
Testing is more thorough, with the possibility of covering most
paths.
Disadvantages
Since tests can be very complex, highly skilled resources are
required, with a thorough knowledge of programming and
implementation.
Test script maintenance can be a burden if the implementation
changes too frequently.
Since this method of testing is closely tied to the application being
tested, tools to cater to every kind of implementation/platform may
not be readily available.
Integration Testing
INTEGRATION TESTING is a level of software testing where individual
units are combined and tested as a group. The purpose of this level of
testing is to expose faults in the interaction between integrated
units. Test drivers and test stubs are used to assist in Integration Testing.
Definition by ISTQB
Analogy
During the process of manufacturing a ballpoint pen, the cap, the body,
the tail and clip, the ink cartridge and the ballpoint are produced
separately and unit tested separately. When two or more units are ready,
they are assembled and Integration Testing is performed. For example,
whether the cap fits into the body or not.
Method
Any of Black Box Testing, White Box Testing and Gray Box
Testing methods can be used. Normally, the method depends on your
definition of ‘unit’.
Tasks
Integration Test Plan
o Prepare
o Review
o Rework
o Baseline
Integration Test Cases/Scripts
o Prepare
o Review
o Rework
o Baseline
Integration Test
o Perform
Approaches
Big Bang is an approach to Integration Testing where all or most of the
units are combined together and tested at one go. This approach is taken
when the testing team receives the entire software in a bundle. So what is
the difference between Big Bang Integration Testing and System Testing?
Well, the former tests only the interactions between the units while the
latter tests the entire system.
Top Down is an approach to Integration Testing where top-level units are
tested first and lower level units are tested step by step after that. This
approach is taken when top-down development approach is followed. Test
Stubs are needed to simulate lower level units which may not be available
during the initial phases.
Bottom Up is an approach to Integration Testing where bottom level units
are tested first and upper-level units step by step after that. This
approach is taken when bottom-up development approach is followed.
Test Drivers are needed to simulate higher level units which may not be
available during the initial phases.
Sandwich/Hybrid is an approach to Integration Testing which is a
combination of Top Down and Bottom Up approaches.
Software Maintenance Overview
Software Maintenance is the process of modifying a software product
after it has been delivered to the customer. The main purpose of
software maintenance is to modify and update software application after
delivery to correct faults and to improve performance. There are number
of reasons, why modifications are required, some of them are briefly
mentioned below:
Market Conditions - Policies, which changes over the time, such as taxation
and newly introduced constraints like, how to maintain bookkeeping, may
trigger need for modification.
Client Requirements - Over the time, customer may ask for new features
or functions in the software.
Maintenance Activities
IEEE provides a framework for sequential maintenance process activities.
It can be used in iterative manner and can be extended so that
customized items and processes can be included.
These activities go hand-in-hand with each of the following phase:
Corrective Maintenance
Corrective maintenance deals with the repair of faults or defects found in day-
to-day system functions. A defect can result due to errors in software design,
logic and coding. Design errors occur when changes made to the software are
incorrect, incomplete, wrongly communicated, or the change request is
misunderstood. Logical errors result from invalid tests and conclusions,
incorrect implementation of design specifications, faulty logic flow, or
incomplete test of data. All these errors, referred to as residual errors, prevent
the software from conforming to its agreed specifications. Note that the need
for corrective maintenance is usually initiated by bug reports drawn by the
users.
In the event of a system failure due to an error, actions are taken to restore the
operation of the software system. The approach in corrective maintenance is
to locate the original specifications in order to determine what the system was
originally designed to do. However, due to pressure from management, the
maintenance team sometimes resorts to emergency fixes known as patching.
Corrective maintenance accounts for 20% of all the maintenance activities.
Adaptive Maintenance
Adaptive maintenance is the implementation of changes in a part of the
system, which has been affected by a change that occurred in some other part
of the system. Adaptive maintenance consists of adapting software to changes
in the environment such as the hardware or the operating system. The term
environment in this context refers to the conditions and the influences which
act (from outside) on the system. For example, business rules, work patterns,
and government policies have a significant impact on the software system.
For instance, a government policy to use a single 'European currency' will
have a significant effect on the software system. An acceptance of this change
will require banks in various member countries to make significant changes in
their software systems to accommodate this currency. Adaptive maintenance
accounts for 25% of all the maintenance activities.
Perfective Maintenance
Perfective maintenance mainly deals with implementing new or changed user
requirements. Perfective maintenance involves making functional
enhancements to the system in addition to the activities to increase the
system's performance even when the changes have not been suggested by
faults. This includes enhancing both the function and efficiency of the code
and changing the functionalities of the system as per the users' changing
needs.
Examples of perfective maintenance include modifying the payroll program to
incorporate a new union settlement and adding a new report in the sales
analysis system. Perfective maintenance accounts for 50%, that is, the largest
of all the maintenance activities.
Preventive Maintenance
Preventive maintenance involves performing activities to prevent the
occurrence of errors. It tends to reduce the software complexity thereby
improving program understandability and increasing software
maintainability. It comprises documentation updating, code optimization, and
code restructuring. Documentation updating involves modifying the
documents affected by the changes in order to correspond to the present state
of the system. Code optimization involves modifying the programs for faster
execution or efficient use of storage space. Code restructuring involves
transforming the program structure for reducing the complexity in source
code and making it easier to understand.
Preventive maintenance is limited to the maintenance organization only and
no external requests are acquired for this type of maintenance. Preventive
maintenance accounts for only 5% of all the maintenance activities.
On the other hand, our developer counterparts are trained into taking a complex
process or project and breaking it down into the smallest possible components that
will allow them to create a solution (I still remember my shock in college the first time
I understood that all a computer could do was work with AND, OR, NOT, NAND,
NOR, XOR and XNOR operations on Zeros & Ones).
I had a developer once tell me that good testers can “smell bugs”, and maybe he
was not very far from the truth.
An experienced tester sees a form and automatically starts thinking about the
common bugs and failures he may find in it and starts testing for them.
In this, software is tested such that it works fine for different operating
system. Here we just focus on required input and output without focusing
on internal working.
Performance testing - This test proves how efficient the software is. It
tests the effectiveness and average time taken by the software to do desired
task. Performance testing is done by means of load testing and stress testing
where the software is put under high user and data load under various
environment conditions.
Security & Portability - These tests are done when the software is meant
to work on various platforms and accessed by number of persons.
Function Point Analysis
Function Point Analysis: In this method, the number and type of functions
supported by the software are utilized to find FPC(function point count). The steps in
function point analysis are:
Count the number of functions of each proposed type.
Compute the Unadjusted Function Points(UFP).
Find Total Degree of Influence(TDI).
Compute Value Adjustment Factor(VAF).
Find the Function Point Count(FPC).
The explanation of above points given below:
Count the number of functions of each proposed type: Find the number of
functions belonging to the following types:
External Inputs: Functions related to data entering the system.
External outputs:Functions related to data exiting the system.
External Inquiries: They leads to data retrieval from system but don’t
change the system.
Internal Files: Logical files maintained within the system. Log files are
not included here.
External interface Files: These are logical files for other applications
which are used by our system.
Compute the Unadjusted Function Points(UFP): Categorise each of the
five function types as simple, average or complex based on their complexity.
Multiply count of each function type with its weighting factor and find the
weighted sum. The weighting factors for each type based on their complexity
are as follows:
FUNCTION TYPE SIMPLE AVERAGE COMPLEX
External Inputs 3 4 6
External Output 4 5 7
External Inquiries 3 4 6
The goal of Mutation Testing is to assess the quality of the test cases which
should be robust enough to fail mutant code. This method is also called as
Fault-based testing strategy as it involves creating a fault in the program
Mutation was originally proposed in 1971 but lost fervor due to the high
costs involved. Now, again it has picked steam and is widely used for
languages such as Java and XML.
Step 1: Faults are introduced into the source code of the program by
creating many versions called mutants. Each mutant should contain a
single fault, and the goal is to cause the mutant version to fail which
demonstrates the effectiveness of the test cases.
Step 2: Test cases are applied to the original program and also to the
mutant program. A Test Case should be adequate, and it is tweaked to
detect faults in a program.
Step 4: If the original program and mutant programs generate the different
output, then that the mutant is killed by the test case. Hence the test case
is good enough to detect the change between the original and the mutant
program.
Step 5: If the original program and mutant program generate the same
output, Mutant is kept alive. In such cases, more effective test cases need
to be created that kill all mutants.
What to change in a Mutant Program?
There are several techniques that could be used to generate mutant
programs. Let's look at them
Mutation Score:
The mutation score is defined as the percentage of killed mutants with the
total number of mutants.
Mutation Score = (Killed Mutants / Total number of Mutants) * 100