Lecture 15 - Introduction To Software Testing-1721286822153
Lecture 15 - Introduction To Software Testing-1721286822153
Management
Lecture 15
Introduction to Software Testing
Can you recall Design Patterns and
1
their categories
Ensuring Quality: Testing helps ensure that the software meets the
desired quality standards and performs its functions correctly.
01 02 03 04 05
Quality Risk
Assurance Mitigation
Types of Software
Testing
Types of Software Testing
White Box testing is a Black Box is a software Gray Box Testing Technique
software testing type in testing type that has uses effective combination
which the detailed nothing to do with the of both Black Box testing
investigation of the internal internal structure or techniques and White Box
structure and logic of the workings of the codes. The testing techniques. Grey
application is conducted. software tester doesn’t Box testing techniques
need to know the system increase testing coverage
architecture or source code. by focusing on all the layers
of a complex system.
Types of Automation Testing
01 02 03 04 05
Integration Acceptance
Testing Testing
Learn about Software Testing ,
purpose and its types
1. Unit Testing
2. Integration Testing
▪ Integration testing comes after unit testing and
involves testing the interactions and interfaces
between different units or modules of the software.
▪ The purpose is to identify any issues that may arise
when combining multiple units and to ensure the
integrated system works as expected.
Levels of Testing continue..
3. System Testing
▪ System testing is conducted once the integration
testing is completed. It tests the entire software
system as a whole, considering both functional and
non-functional aspects.
▪ The primary goal is to validate that the software meets
the specified requirements and performs as expected
in the target environment.
Levels of Testing continue..
4. Acceptance Testing
▪ Acceptance testing is the final testing level and is
performed to determine whether the software meets
the acceptance criteria defined by the stakeholders,
including end-users or customers. It can be further
divided into two sub-levels:
▪ User Acceptance Testing (UAT): Involves
end-users testing the software in a real-world
scenario to ensure it aligns with their needs and
expectations.
▪ Business Acceptance Testing (BAT): Performed by
business representatives to verify that the
software meets business requirements and
objectives.
Software Testing Process
Test Planning: Defining the scope, objectives, resources, and schedule for
testing. Test planning involves identifying the testing types, techniques,
and methodologies to be used.
Test Design: Creating test cases and test scenarios based on requirements
and specifications. Test data and test environments are also prepared
during this stage.
Test Execution: Running the test cases and observing the software's
behavior to detect defects or deviations from expected results.
Defect Reporting: If any defects are found during test execution, they are
documented and reported to the development team for fixing.
Defect Retesting: After the development team fixes the reported defects,
the testing team retests them to verify that the issues have been resolved.
Test-Driven Development
(TDD)
Test-Driven Development (TDD) is a software development
approach that emphasizes writing tests before writing the
actual code. The TDD process typically follows a three-step
cycle: write a test, write the code to pass the test, and then
refactor the code if necessary.
Principles of Test-Driven Development
In TDD, the developer starts The next step is to write the After making the test pass,
by writing a test case for a minimum amount of code the developer refactors the
specific functionality or required to make the failing code to improve its design
requirement. test case pass. and maintainability while
ensuring that all tests
This test case initially fails The code is not optimized or continue to pass.
since the corresponding extended beyond what is
code has not been necessary to satisfy the
implemented yet. test.
Importance of Test-Driven Development (TDD)
Better Design: Since tests are written before the code, TDD drives
developers to think about the interfaces and interactions between
different components of the software.
In the Red phase, the In the Green phase, the In the Refactor phase, the
developer starts by writing a developer writes the developer improves the
test case for a specific minimum amount of code code's design, structure,
functionality that is yet to be necessary to make the and efficiency without
implemented. failing test pass. changing its behavior.
This test case is expected to The primary objective is to The goal is to make the
fail since the corresponding make the test case succeed code more maintainable,
code is not present in the by implementing the understandable, and
codebase. required functionality or aligned with best practices.
logic.
Advantages of TDD Cycle
In unit testing, individual In integration testing, the In system testing, the entire
units or components of the interactions and interfaces software system is
software are tested in between different units or evaluated to ensure it
isolation to ensure they modules of the software are meets the specified
function correctly. tested. requirements and functions
correctly. Although system
TDD is particularly testing involves testing the
well-suited for unit testing. software as a whole.
w le dge
e fo r K no
Ti m ck ! !
C h e
Quiz
Testing shows the presence of defects Early testing saves time and money
c d
Testing shows the presence of defects Early testing saves time and money
c d