UNIT IV Software Engineering Notes
UNIT IV Software Engineering Notes
Software Testing
• Software Testing is the process of evaluating a software
application to identify if it meets specified
requirements and to identify any defects
• Software Testing is a type of investigation to find out if
there is any default or error present in the software so
that the errors can be reduced or removed to increase
the quality of the software and to check whether it
fulfills the specifies requirements or not.
According to Glen Myers, software testing has the
following objectives:
Appium
Selenium
Microsoft Coded UI
Applitools HP QTP.
• Black box testing Methods
1. Syntax-Driven Testing – This type of testing is applied to systems that
can be syntactically represented by some language. For example- compilers,
language that can be represented by context-free grammar. In this, the test
cases are generated so that each grammar rule is used at least once.
3. Boundary value analysis – Boundaries are very good places for errors to
occur. Hence if test cases are designed for boundary values of the input
domain then the efficiency of testing improves and the probability of finding
errors also increases. For example – If the valid range is 10 to 100 then test
for 10,100 also apart from valid and invalid inputs.
• It is also called glass box testing or clear box testing or structural testing.
White Box Testing is also known as transparent testing or open box testing.
• White box testing is a software testing technique that involves testing the
internal structure and workings of a software application.
• The tester has access to the source code and uses this knowledge to
design test cases that can verify the correctness of the software at the
code level.
• White box testing is also known as structural testing or code-based testing,
and it is used to test the software’s internal logic, flow, and structure. The
tester creates test cases to examine the code paths and logic flows to
ensure they meet the specified requirements.
PyUnit
Sqlmap
Nmap
Parasoft Jtest
Nunit
• Features of white box testing:
Code coverage analysis: White box testing helps to analyze the code
coverage of an application, which helps to identify the areas of the code that
are not being tested.
Access to the source code: White box testing requires access to the
application’s source code, which makes it possible to test individual functions,
methods, and modules.
Knowledge of programming languages: Testers performing white box testing
must have knowledge of programming languages like Java, C++, Python, and
PHP to understand the code structure and write tests.
Identifying logical errors: White box testing helps to identify logical errors in
the code, such as infinite loops or incorrect conditional statements.
4.Basis Path Testing: In this technique, control flow graphs are made from
code or flowchart and then Cyclomatic complexity is calculated which defines
the number of independent paths so that the minimal number of test cases
can be designed for each independent path.
Advantages:
• White box testing is thorough as the entire code and structures are tested.
• It results in the optimization of code removing errors and helps in removing
extra lines of code.
• It can start at an earlier stage as it doesn’t require any interface as in the
case of black box testing.
• Easy to automate.
Disadvantages:
• It is very expensive.
• Redesigning code and rewriting code needs test cases to be written again.
• Testers are required to have in-depth knowledge of the code and
programming language as opposed to black-box testing.
Differences between Black Box Testing vs White Box Testing:
Unit Testing
Jtest
Junit
NUnit
EMMA
PHPUnit
Advantages of Unit Testing:
• Unit Testing allows developers to learn what functionality is provided by a
unit and how to use it to gain a basic understanding of the unit API.
• Unit testing allows the programmer to refine code and make sure the
module works properly.
• Unit testing enables testing parts of the project without waiting for others to
be completed.
Disadvantages of Unit Testing:
• The process is time-consuming for writing the unit test cases.
• Unit Testing will not cover all the errors in the module because there is a
chance of having errors in the modules while doing integration testing.
• Unit Testing is not efficient for checking the errors in the UI(User Interface)
part of the module.
System Testing
• System testing is a type of software testing that evaluates the overall
functionality and performance of a complete and fully integrated software
solution.
• It tests if the system meets the specified requirements and if it is suitable
for delivery to the end-users.
• This type of testing is performed after the integration testing and before
the acceptance testing.
• System Testing is carried out on the whole system in the context of either
system requirement specifications or functional requirement specifications
or in the context of both.
• System testing tests the design and behavior of the system and also the
expectations of the customer.
• It is performed to test the system beyond the bounds mentioned in the
software requirements specification (SRS).
• System Testing is a black-box testing. System Testing is performed after the
integration testing and before the acceptance testing.
• JMeter
• Gallen Framework
• Selenium
Advantages of System Testing :
• This testing is time consuming process than another testing techniques since
it checks the entire product or software.
• The cost for the testing will be high since it covers the testing of entire
software.
• It needs good debugging tool otherwise the hidden errors will not be found.
Debugging
Debugging Tools:
• Radare2
• WinDbg
• Valgrind
Advantages of Debugging:
Improved system quality: By identifying and resolving bugs, a software system
can be made more reliable and efficient, resulting in improved overall quality.