0% found this document useful (0 votes)
12 views41 pages

SDP Slides For Group IJ

The document provides an overview of software testing, emphasizing its importance in identifying defects, improving product quality, and ensuring customer satisfaction. It covers various testing types, including unit, integration, system, and release testing, along with methodologies like Test Driven Development (TDD). Additionally, it discusses validation versus verification, the software testing life cycle, and the ethical considerations in prioritizing functionalities during testing.

Uploaded by

ann karagwa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views41 pages

SDP Slides For Group IJ

The document provides an overview of software testing, emphasizing its importance in identifying defects, improving product quality, and ensuring customer satisfaction. It covers various testing types, including unit, integration, system, and release testing, along with methodologies like Test Driven Development (TDD). Additionally, it discusses validation versus verification, the software testing life cycle, and the ethical considerations in prioritizing functionalities during testing.

Uploaded by

ann karagwa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 41

SOFTWARE TESTING

GROUP IJ
Testing
Is the process of ensuring that a program does what its
supposed to do and discover program defects.

We test to do two things:


• For demonstration that it meets the
requirements(customer products, generic products).
• For finding inputs where the behavior is not correct.
IMPORTANCE OF TESTING
• Identifies Defects early
• Improves product quality since products have to pass quality
assurance expectations
• Increases customer trust and satisfaction.it provides visibility
into a product strong and weak points such that by the time it is
delivered, it is quality.
• Detects security vulnerability , especially online applications
that are prone to hacking.
• Helps with scalability
• Helps save money
Validation and
verification
Validation: the process of ensuring that the
software meets the customers expectations.
Verification: the process of checking that
software meets its stated functional and non-
functional requirements.
Both ensure that the software is fit for the
purpose
Validation vs verification
Validation(dynamic Verification(static
testing) testing)
• Involves code execution to
validate the functionality • Does not involve execution of the
• Finds bugs/defects during code
dynamic testing phase • Finds bugs/defects early in the life
• Cost of defects is high cycle
• Costs of defects is less
Few types of testing are
• :?1.unit testing Few types of testing are:
• ?2.integration testing • ?1.reviews
• ?3.system testing • ?2.tech reviews
• ?4.acceptance testing • ?3.walk through
• ?5.regration testing • ?4.code review
• ?5.inspection
Software testing life cycle
This is the process of testing any application
DEVELOPMENT TESTING
Development testing is where the system is
tested during development to discover bugs
and defects. System designers and
programmers are likely to be involved in the
testing process.
Stages of development testing:
There are three stages of development testing which include unit
testing, component testing and system testing as explained below;

UNIT TESTING:
Unit testing is the first level of testing. At this stage, developers test
individual units of the system to make sure that they are usable.
Unit: This is the smallest software component that usually performs
a single cohesive function.

Objectives of unit testing:


- Detect errors and bugs early in development.
- Verify that each unit of code functions as intended.
- Catch regressions to maintain code stability.
- Provide documentation and understanding of code behavior
Types of Unit Testing
Automated Testing:
In automated unit testing, you make use of a test
automation framework, such as JUnit write and run your
program tests.

Parts of an automated Testing


• A setup part
• A call part
• An assertion part
Manual Testing
Its an automatic testing that focuses on testing individual
components.
It involves human testers that actually test the functionality
of particular components.

Strategies that help in effective choosing of test cases


• Partitioning testing
• Guideline-based testing
COMPONENT TESTING/INTEGRATION
TESTING
Purpose: The main purpose of this software testing
level is to find bugs in the interaction of system units.

Kinds of Integration Testing


Top-down integration testing.
• Here QA engineers perform testing from the higher
levels to the lower levels following the control flow.

Bottom up integration testing


• Here the tester first checks the lower unit levels
before proceeding to the higher level units.
Illustration:
PROCESS OF COMPONENT TESTING
• This process involves testing how each component
interacts with another through interfaces. Testing
composite components should therefore focus on showing
that the component interfaces behave according to their
specification.

Types of interfaces between program components.


• Parameter interfaces These are interfaces in which data or
sometimes function references are passed from one
component to another.
• Shared memory interfaces These are interfaces in which a
block of memory is shared between components.
Procedural interfaces: These are interfaces in
which one component encapsulates a set of
procedures that can be called by other
components
Message passing interfaces: These are interfaces
in which one component requests a service from
another component by passing a message to it.
INTERFACE ERRORS

■ Interface misuse A calling component calls some other


component and makes an error in the use of its interface
■ Interface misunderstanding A calling component
misunderstands the specification of the interface of the
called component and makes assumptions about its
behavior.
■ Timing errors These occur in real-time systems that use
a shared memory or a message-passing interface. The
producer of data and the consumer of data may operate
at different speeds.
GENERAL GUIDELINES FOR COMPONENT
INTERFACE TESTING.
1. Examine the code to be tested and identify each call to an
external component
2. Where pointers are passed across an interface, always test the
interface with null pointer parameters.
3. Where a component is called through a procedural interface,
design tests that deliberately cause the component to fail
4. Use stress testing in message passing systems
5. Where several components interact through shared memory,
design tests that vary the order in which these components are
activated
SYSTEM TESTING
• System testing during development involves integrating
components to create a version of the system and then testing
the integrated system.
• System testing checks that components are compatible,
interact correctly, and transfer the right data at the right time
across their interfaces.
• You should always use an incremental approach to integration
and testing where you integrate a component, test the system,
integrate another component, test again, and so on. If
problems occur, they are probably due to interactions with the
most recently integrated component
Types of System Testing
• Performance Testing: Performance Testing is a type of software
testing that is carried out to test the speed, scalability, stability and
reliability of the software product or application.
• Load Testing: Load Testing is a type of software Testing that is
carried out to determine the behavior of a system or software
product under extreme load.
• Stress Testing: Stress Testing is a type of software testing performed
to check the robustness of the system under varying loads.
• Scalability Testing: Scalability Testing is a type of software testing
which is carried out to check the performance of a software
application or system in terms of its capability to scale up or scale
down the number of user request load.
ADVANTAGES AND DISADVANTAGES OF
SYSTEM TESTING
Advantages:
• Verifies the overall functionality of the system.
• Supports the identification of system-level
dependencies and inter-module interactions

Disadvantages:
• Can be complex and challenging, especially for
large and complex systems.
• This testing is time consuming process than another
testing techniques since it checks the entire product
or software.
TEST DRIVEN DEVELOPMENT
INTRODUCTION TO TDD
• TDD is a software development process where tests
are written before the code, guiding the development
process.
• TDD was introduced as part of a larger software
design known as Extreme Programming(XP), which is
part of the Agile development methodology.
• TDD interlaces unit testing, programming and
refactoring on source code during software
development.
THE STEPS TAKEN IN TDD

1.Add a test – Write a test case that describe the function completely.
2.Run all the test cases and make sure that the new test case fails.
3.Write the code that passes the test case
4.Run the test cases
5.Refactor code – This is done to remove duplication of code.
6.Repeat the above mentioned steps again and again
THE TDD PROCESS OVERVIEW

• Red – Create a test case and make it fail


• Green – Make the test case pass by any means.
• Refactor – Change the code to remove
duplicate/redundancy.
ADVANTAGES AND
DISADVANTAGES
ADVANTAGES DISADVANTAGES
• Production of high quality • Requires a considerable skill
applications. to be successful.
• A unit test provides • Resistance to writing tests
constant feedback of the first.
functions. • Time constraints.
• A safety net against bugs. • Some negative
• Short development misconceptions about TDD
lifecycle. amongst developers.
• Minimizes testing cost.
BEST PRACTICES IN TDD
• Clear tests.
• Test independence.
• Proper refactoring.
TDD TOOLS AND
FRAMEWORKS
• Junit for Java.
• Pytest for Python.
• Jest for JavaScript.
• XCTest for Swift.
• Nunit for .NET.
TDD AND AGILE DEVELOPENT
• Iterative and incremental development.
• Customer collaboration.
• Continuous improvement.
• Flexibility and adaptability.
RELEASE TESTING
This is the process of testing a particular system that is
intended for outside use of the development team(that
is normally customers and users).
However, it could also be other for other teams
developing related systems.
Release testing , therefore is to show that system
deliver its specified functionality, performance ,
dependability and does not fail during normal use.
Release is a blackbox testing process.
Approaches to release
testing
• Requirement based testing
• Scenario testing
• Performance testing
Requirement based testing
• Is a systematic approach to test-case design where your consider
each requirement and derive a set of tests for it .
• it is validation rather than requirement testing.
• For example consider the following mentcare system requirements
that are concerned with checking drug allergies
• if a patient is known to be allergic to any particular medication,
this shall result in a prescription issued to the system during
prescription.
• if a prescriber is to ignore an allergy warning he or she shall
provide a reason on why it is being ignored.
• To check if the requirements have been satisfied , you may need to
develop related tests .
• Set up a patient record with no known allergies. Prescribe
medication for allergies that are known to exist. Check that
warning message is not issued by the system.
• Set up a patient record with a known allergy .Prescribe the
medication that the patient is allergic to and check that the
warning is not issued by the system.
• Prescribe two drugs that the patient is allergic to. Check that
two warnings are issued correctly.
Scenario testing
What is scenario testing ?
• Is an approach to release testing whereby you devise typical
scenarios and use scenarios to develop test cases for the system.

What is a scenario ?
• Is a story that describes one way in which the system might be
used.

What to keep in mind when choosing scenario


• Scenarios should be realistic.
• Users should be able to relate to the system.
• Examples of Scenario testing
• In an e-commerce application, scenario testing
might involve scenarios such as user registration,
product search, adding items to the shopping cart,
and completing a purchase.

• For a banking application, scenario testing could


include scenarios like account login, funds transfer,
bill payment, and balance inquiry.
Continuation
• if you are a release tester, you run through the
scenarios observing how the system behaves in
response to different inputs.

• You may make deliberate mistakes such as wrong


passwords. This checks the response of the system
to errors and should note down the problems that
may arise and act accordingly.
Performance testing
Performance testing is an approach to release testing that
evaluates how a system performs under various conditions such
as workload, stress and responsiveness.
• Performance tests have to be designed to ensure that the
system can process the intended load.
• To test the performance of the system you may have to
construct an operational profile which is a set of tests that
reflect the actual mix of work that maybe handled by the
system.
Continuation
• Effective approach is to design tests around the limits of the
systems. That means making demands that are outside the
design limits of the system (stress testing)
• Example
• A system that handles 200 transactions per second, you may
start testing with loads below<200 and gradually increase
beyond 200 beyond the max design of the system until it fails.

• This may help you to know two things.


• The failure behaviour of the system
• Reveal the defects that show up during overload.
QUESTIONS 8.50 AND 8.10
8.50 What is regression testing ?
This involves running test sets that have been
successfully executed after making changes or
modifications to a program.
That is checking whether a change that has
been made to a program ahs brought any new
bugs.
QUESTIONS 8.50 AND 8.10
8.50 Explain how the use of automated tests and testing
frameworks such JUNIT simplifies regression testing?
1.Efficiency: Automated tests can be executed quickly and
repeatedly without manual intervention.
2.Consistency: Automated tests ensure consistent testing
procedures and criteria are applied across different test
runs.
3.Comprehensive Coverage: Automated tests can cover a
wide range of test cases, including edge cases and
scenarios that might be time-consuming or difficult to
test manually.
8.50 continuation

4. Faster Feedback: Automated tests provide faster


feedback on the impact of code changes.

5. Version Control Integration: Automated tests can


be version-controlled along with the source code,
ensuring that the tests remain synchronized with
the application's development.
8.10
A common approach to system testing is to test the important functionalities
of a system first followed by the less important functionalities until the
testing is exhausted .Discuss the ethics involved in identifying what more
important means .
• Safety: The most critical factor in identifying important functionalities is
safety. Ensuring that the system operates without posing any risk to
human life or well-being should be the top priority.
• Security: Protecting user data and system integrity is another key ethical
consideration.
• Compliance: Ethical standards and legal requirements must also be
considered when determining the importance of functionalities.
• User Impact: Considering the impact on end-users is essential from an
ethical standpoint.
REFERENCES
Software Engineering: Principles and Practice {Hans van Vilet
(c)Wiley,2007}.
Software Engineering by Ian Sommerville Chapter 18 pg 228-
251.
Geeks for Geeks (https://www.geeksforgeeks.org)
Tech Target (https://www.techtarget.com/).
Software Testing tutorial: Verification and Validation:
https://youtu.be/UeMBhDwmOrE?si=Egrko3xQiXKcm7Ya

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy