Software Testing
Software Testing
Software Testing........................................................................................................... 1
1. What is Software Testing?................................................................................. 2
2. Importance of the Software Testing................................................................2
3. Seven Testing Principles.................................................................................... 3
4. Software Development Cycle............................................................................ 4
5. Manual Testing vs Automation Testing............................................................6
6. Static Testing vs Dynamic Testing....................................................................7
7. Functional Testing............................................................................................. 11
8. White box - Unit Testing.................................................................................. 12
9. Black box - Integration Testing.......................................................................13
10. Smoke Testing................................................................................................. 15
11. Sanity / Delta testing....................................................................................... 16
12. System Testing............................................................................................... 17
13. The Software Testing Hierarchy..................................................................17
14. Equivalence Class Partitioning (ECP)..........................................................18
15. Boundary Value Analysis (BVA)....................................................................20
16. Decision Table Testing................................................................................... 21
17. Non-functional Testing.................................................................................. 24
18. Regression testing......................................................................................... 27
1.What is Software Testing?
defect free.
As Paul Elrich puts it - "To err is human, but to really foul things up you
need a computer."
3.Seven Testing Principles
Testing can show that the defects are present, but cannot prove that there
are no defects. Even after testing the application or product thoroughly we
cannot say that the product is 100% defect free. Testing always reduces the
number of undiscovered defects remaining in the software but even if no
defects are found, it is not a proof of correctness.
If the same kinds of tests are repeated again and again, eventually the
same set of test cases will no longer be able to find any new bugs. To overcome
this Pesticide Paradox, it is really very important to review the test cases
regularly and new and different tests need to be written to exercise different
parts of the software or system to potentially find more defects
If the system built is unusable and does not fulfil the users needs and
expectations then finding and fixing defects does not help.
Design Stage Plan the programming language like Java, PHP, .net;
database like Oracle, MySQL, etc. Which would be suited
for the project, also some high-level functions &
architecture.
Built Stage After design stage, it is built stage, that is nothing but
actually code the software
Test Stage Next, you test the software to verify that it is built as
per the specifications given by the client.
The V model of testing was developed where for every phase, in the
Development life cycle there is a corresponding Testing phase:
The left side of the model is Software Development Life Cycle - SDLC
The right side of the model is Software Test Life Cycle - STLC
The entire figure looks like a V, hence the name V model
SDLC:
SDLC is Software Development Life Cycle. It is the sequence of
activities carried out by Developers to design and develop high-quality
software.
Though SDLC uses the term Development, it does not involve just coding
tasks done by developers but also incorporates the tasks contributed by
testers and stakeholders.
In SDLC, test cases are created.
STLC:
STLC is Software Testing Life Cycle. It consists of series of activities
carried out by Testers methodologically to test your software product.
Though STLC uses the term testing it does not involve just testers, at
some instances, they have to involve developers as well.
In STLC Test cases are executed.
Manual testing will require skilled labor, Automation Testing saves time, cost
long time & will imply high costs. and manpower. Once recorded, it's
easier to run an automated test suite
Requirement specifications
Design document
Source Code
Test Plans
Test Cases
Test Scripts
Help or User document
Web Page content
Summary:
Static testing involves checklist and Dynamic testing involves test cases for
process to be followed execution
Static testing covers the structural and Dynamic testing covers the executable
statement coverage testing file of the code
Cost of finding defects and fixing is Cost of finding and fixing defects is
less high
More reviews comments are highly More defects are highly recommended
recommended for good quality for good quality.
Conclusion:
Verification and Validation are two measures used to check that the
software product meets the requirements specifications. Static testing
involves verification whereas dynamic testing involves validation.
Together they help improve software quality
7.Functional Testing
Functional testing verifies that each function of the software
application operates in conformance with the requirement specification.
This testing mainly involves black box testing and it is not concerned
about the source code of the application.
The testing can be done either manually or using automation
Unit Testing
Smoke Testing
Sanity Testing
Integration Testing
White box testing
Black Box testing
User Acceptance testing
Regression Testing
EXAMPLE
What is Unit Testing?
White Box Testing method is used for executing the unit test.
1. Issues are found at early stage. Since unit testing are carried out
by developers where they test their individual code before the integration.
Hence the issues can be found very early and can be resolved then and
there without impacting the other piece of codes.
3. Since the bugs are found early in unit testing hence it also helps
in reducing the cost of bug fixes. Just imagine the cost of bug found
during the later stages of development like during system testing or
during acceptance testing.
White-box techniques
1. Branch Coverage
2. Statement Coverage
EXAMPLE
What is Integration Testing?
In Integration Testing, individual software modules are integrated
logically and tested as a group.
A typical software project consists of multiple software modules,
coded by different programmers.
Integration testing focuses on checking data communication
amongst these modules.
Although each software module is unit tested, defects still exist for
various reasons like:
Similarly Mail Box: Check its integration to the Delete Mails Module.
These are the steps taken to fully test new software in preparation
for marketing it:
Unit testing - testing performed on each module or block of code
during development. Unit testing is normally done by the programmer
who writes the code.
Integration testing - testing done before, during and after
integration of a new module into the main software package. This involves
testing of each individual code module. One piece of software can contain
several modules which are often created by several different
programmers. It is crucial to test each module's effect on the entire
program model.
System testing - testing done by a professional testing agent on
the completed software product before it is introduced to the market.
Acceptance testing - beta testing of the product done by the
actual end users.
Summary:
Icon is disabled. In the decision table, we register values False for Fly
From & Fly To and the outcome would be False, which is Flights Button
will be disabled. Likewise, you can decide different outcome for
different situation.
Rule 2: When Fly From destination is set but Fly to is not set, Flight
Rule 3: When Fly from destination is not set but Fly to destination is set,
Flight button is disabled and you make entries in the decision table.
Rule 4: only when Fly to and Fly from destinations are set, Flights button
is enabled and you make the corresponding entry in the decision table.
If you observe the outcomes for Rule 1, 2 & 3 it remains the same.
So you can select any one of them and rule 4 for your testing.
in the web based testing, having big input forms, the number
of combinations will be 1024. Obviously, you cannot test all but you will
choose a rich sub-set of the possible combinations using decision based
testing technique
17. Non-functional Testing
Load testing
Load testing is a kind of performance testing which determines a
system's performance under real-life load conditions. This testing helps
determine how the application behaves when multiple users access it
simultaneously.
This testing usually identifies -
The maximum operating capacity of an application
Determine whether current infrastructure is sufficient to run the
application
Sustainability of application with respect to peak user load
Number of concurrent users that an application can support, and
scalability to allow more users to access it.
It is a type of non-functional testing. Load testing is commonly used
for the Client/Server, Web based applications - both Intranet and
Internet.
Stress testing
Stress testing is used to test beyond the normal operating point and
evaluates how the system works under those extreme conditions. Stress Testing
is done to make sure that the system would not crash under crunch situations.
Most prominent use of stress testing is to determine the limit, at which
the system or software or hardware breaks. It also checks whether system
demonstrates effective error management under extreme conditions.
Need for Stress Testing
During festival time, an online shopping site may witness a spike
in traffic, or when it announces a sale.
When a blog is mentioned in a leading newspaper, it experiences
a sudden surge in traffic.
Load testing does not break the Stress testing tries to break
system the system by testing with
overwhelming data or
resources.
Endurance testing - is done to make sure the software can handle the
expected load over a long period of time.
Volume testing - Under Volume Testing large no. of. Data is populated
in database and the overall software system's behavior is monitored.
The objective is to check software application's performance under
varying database volumes.
Long Load time - Load time is normally the initial time it takes an
application to start. This should generally be kept to a minimum. While
some applications are impossible to make load in under a minute, Load
time should be kept under a few seconds if possible.
Poor response time - Response time is the time it takes from when a
user inputs data into the application until the application outputs a
response to that input. Generally this should be very quick. Again if a
user has to wait too long, they lose interest.
Poor scalability - A software product suffers from poor scalability
when it cannot handle the expected number of users or when it does
not accommodate a wide enough range of users. Load testing should be
done to be certain the application can handle the anticipated number of
users.
Bottlenecking - Bottlenecks are obstructions in system which degrade
overall system performance. Bottlenecking is when either coding errors
or hardware issues cause a decrease of throughput under certain loads.
Bottlenecking is often caused by one faulty section of code. The key to
fixing a bottlenecking issue is to find the section of code that is causing
the slow down and try to fix it there. Bottle necking is generally fixed by
either fixing poor running processes or adding additional Hardware.
Some common performance bottlenecks are
CPU utilization
Memory utilization
Network utilization
Operating System limitations
Disk usage
Retest All
This is one of the methods for regression testing in which all the
tests in the existing test bucket or suite should be re-executed. This is
very expensive as it requires huge time and resources.
Regression Test Selection
Instead of re-executing the entire test suite, it is better to select part
of test suite to be run
Test cases selected can be categorized as 1) Reusable Test Cases 2)
Obsolete Test Cases.
Re-usable Test cases can be used in succeeding regression cycles.
Obsolete Test Cases can't be used in succeeding cycles.
Prioritization of Test Cases
Prioritize the test cases depending on business impact, critical &
frequently used functionalities. Selection of test cases based on priority
will greatly reduce the regression test suite.
When a tester executes the test cases, he might come across the test result
which is contradictory to expected result. This variation in the test result is referred
as a defect. These defects or variation are referred by different names in a
different organization like issues, problem, bug or incidents.
While reporting the bug to developer, your Bug Report should contain the
following information
This topic will guide you on how to apply the defect management process.
You can follow the below steps to manage defects.
Discovery
Categorization
Verification
After the development team fixed and reported the defect, the testing
team verifies that the defects are actually resolved.
For example, in the above scenario, when the development team reported
that they already fixed 61 defects, your team would test again to verify
these defects were actually fixed or not.
Closure
Once a defect has been resolved and verified, the defect is changed
status as closed. If not, you have send a notice to the development to
check the defect again.
Reporting
The management board has right to know the defect status. They must
understand the defect management process to support you in this project.
Therefore, you must report them the current defect situation to get
feedback from them.
Defect/Bug Life Cycle
New: When a new defect is logged and posted for the first time. It is
assigned a status NEW.
Assigned: Once the bug is posted by the tester, the lead of the
tester approves the bug and assigns the bug to developer team
Open: The developer starts analyzing and works on the defect fix
Fixed: When developer makes necessary code change and verifies
the change, he or she can make bug status as "Fixed."
Pending retest:Once the defect is fixed the developer gives
particular code for retesting the code to the tester. Since the testing
remains pending from the testers end, the status assigned is "pending
request."
Retest: Tester does the retesting of the code at this stage to check
whether the defect is fixed by the developer or not and change the
status to "Re-test."
Verified: The tester re-tests the bug after it got fixed by the
developer. If there is no bugdetected in the software, then the bug is
fixed and the status assigned is "verified."
Reopen: If the bug persists even after the developer has fixed the
bug, the tester changes the status to "reopened". Once again the bug
goes through the life cycle.
Closed: If the bug is no longer exits then tester assign the status
"Closed."
Duplicate: If the defect is repeated twice or the defect corresponds
the same concept of the bug, the status is changed to "duplicate."
Rejected: If the developer feels the defect is not a genuine defect
than it changes the defect to "rejected."
Deferred: If the present bug is not of a prime priority and if it is
expected to get fixed in the next release, then status "Deferred" is
assigned to such bugs
Not a bug:If it does not affect the functionality of the application
then the status assigned to a bug is "Not a bug".
AGILE Cycle
AGILE Methodology
AGILE Methodology2