[go: up one dir, main page]

0% found this document useful (0 votes)
82 views8 pages

Software Engg Unit-3 Testing Notes

The document discusses the differences between faults and failures in software. A fault is an unintended behavior caused by issues like invalid steps or lack of data definitions, while a failure is the accumulation of defects that cause a system to become unresponsive. Debugging is the process of identifying and resolving errors or bugs through methods like code inspection, unit testing, and monitoring software behavior.

Uploaded by

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

Software Engg Unit-3 Testing Notes

The document discusses the differences between faults and failures in software. A fault is an unintended behavior caused by issues like invalid steps or lack of data definitions, while a failure is the accumulation of defects that cause a system to become unresponsive. Debugging is the process of identifying and resolving errors or bugs through methods like code inspection, unit testing, and monitoring software behavior.

Uploaded by

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

Fault and Failure?

Sometimes due to certain factors such as Lack of resources or not following proper steps Fault
occurs in software which means that the logic was not incorporated to handle the errors in the
application. This is an undesirable situation, but it mainly happens due to invalid documented steps
or a lack of data definitions.
 It is an unintended behavior by an application program.
 It causes a warning in the program.
 If a fault is left untreated it may lead to failure in the working of the deployed code.
 A minor fault in some cases may lead to high-end error.
 There are several ways to prevent faults like adopting programming techniques, development
methodologies, peer review, and code analysis.
What is a Failure?
Failure is the accumulation of several defects that ultimately lead to Software failure and results in
the loss of information in critical modules thereby making the system unresponsive.
Failure is detected by end-users once they face a particular issue in the software.
 Failure can happen due to human errors or can also be caused intentionally in the system by an
individual.
 It is a term that comes after the production stage of the software.
 It can be identified in the application when the defective part is executed.
A simple diagram depicting Bug vs Defect vs Fault vs Failure:

What is Debugging in Software Engineering?


Debugging is the process of identifying and resolving errors, or bugs, in a software system. It is an
important aspect of software engineering because bugs can cause a software system to malfunction,
and can lead to poor performance or incorrect results. Debugging can be a time-consuming and
complex task, but it is essential for ensuring that a software system is functioning correctly.
Debugging Aproaches
Methods and Techniques Used in Debugging
There are several common methods and techniques used in debugging, including:
1. Code Inspection: This involves manually reviewing the source code of a software system to
identify potential bugs or errors.
2. Debugging Tools: There are various tools available for debugging such as debuggers, trace
tools, and profilers that can be used to identify and resolve bugs.
3. Unit Testing: This involves testing individual units or components of a software system to
identify bugs or errors.
4. Integration Testing: This involves testing the interactions between different components of a
software system to identify bugs or errors.
5. System Testing: This involves testing the entire software system to identify bugs or errors.
6. Monitoring: This involves monitoring a software system for unusual behavior or performance
issues that can indicate the presence of bugs or errors.
7. Logging: This involves recording events and messages related to the software system, which
can be used to identify bugs or errors.
Unit Testing
 Unit testing involves the testing of each unit or an individual component of the software
application. It is the first level of functional testing. The aim behind unit testing is to validate
unit components with its performance.
 A unit is a single testable part of a software system and tested during the development phase
of the application software.
 The purpose of unit testing is to test the correctness of isolated code. A unit component is an
individual function or code of the application. White box testing approach used for unit
testing and usually done by the developers.
 Whenever the application is ready and given to the Test engineer, he/she will start checking
every component of the module or module of the application independently or one by one,
and this process is known as Unit testing or components testing.
Unit Testing Tools
We have various types of unit testing tools available in the market, which are as follows:
o NUnit
o JUnit
o PHPunit
o Parasoft Jtest
o EMMA
Unit Testing Techniques:
Unit testing uses all white box testing techniques as it uses the code of software application:
o Data flow Testing
o Control Flow Testing
o Branch Coverage Testing
o Statement Coverage Testing
o Decision Coverage Testing
Advantages
o Unit testing uses module approach due to that any part can be tested without waiting for completion of
another parts testing.
o The developing team focuses on the provided functionality of the unit and how functionality should
look in unit test suits to understand the unit API.
o Unit testing allows the developer to refactor code after a number of days and ensure the module still
working without any defect.
Disadvantages
o It cannot identify integration or broad level error as it works on units of the code.
o In the unit testing, evaluation of all execution paths is not possible, so unit testing is not able to catch
each and every error in a program.
o It is best suitable for conjunction with other testing activities.
Black box testing
 Black box testing is a technique of software testing which examines the functionality of software
without peering into its internal structure or coding. The primary source of black box testing is a
specification of requirements that is stated by the customer.
 In this method, tester selects a function and gives input value to examine its functionality, and checks
whether the function is giving expected output or not. If the function produces correct output, then it is
passed in testing, otherwise failed..

Generic steps of black box testing


o The black box test is based on the specification of requirements, so it is examined in the
beginning.
o In the second step, the tester creates a positive test scenario and an adverse test scenario by
selecting valid and invalid input values to check that the software is processing them correctly
or incorrectly.
o In the third step, the tester develops various test cases such as decision table, all pairs test,
equivalent division, error estimation, cause-effect graph, etc.
o The fourth phase includes the execution of all test cases.
o In the fifth step, the tester compares the expected output against the actual output.
o In the sixth and final step, if there is any flaw in the software, then it is cured and tested again.

Techniques Used in Black Box Testing


Decision-Table Decision Table Technique is a systematic approach where various input combinations and their
Technique respective system behaviour are captured in a tabular form. It is appropriate for the functions that
have a logical relationship between two and more than two inputs.

Boundary-Value Boundary Value Technique is used to test boundary values, boundary values are those that contain
Technique the upper and lower limit of a variable. It tests, while entering boundary value whether the software
is producing correct output or not.

State-Transition State Transition Technique is used to capture the behaviour of the software application when
Technique different input values are given to the same function. This applies to those types of applications that
provide the specific number of attempts to access the application.

All-pair-Testing All-pair testing Technique is used to test all the possible discrete combinations of values. This
Technique combinational method is used for testing the application that uses checkbox input, radio button
input, list box, text box, etc.

Cause-Effect Cause-Effect Technique underlines the relationship between a given result and all the factors
Technique affecting the result. It is based on a collection of requirements.

Equivalence Equivalence partitioning is a technique of software testing in which input data divided into
Partitioning partitions of valid and invalid values, and it is mandatory that all partitions must exhibit the same
Technique behaviour.

Error-Guessing Error guessing is a technique in which there is no specific method for identifying the error. It is
Technique based on the experience of the test analyst, where the tester uses the experience to guess the
problematic areas of the software.

Use-Case Use case Technique used to identify the test cases from the beginning to the end of the system as per
Technique the usage of the system. By using this technique, the test team creates a test scenario that can
exercise the entire software based on the functionality of each function from start to end.

White box Testing

 White box testing techniques analyze the internal structures the used data structures,
internal design, code structure, and the working of the software rather than just the
functionality as in black box testing. 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.

Process of White Box Testing


1. Input: Requirements, Functional specifications, design documents, source code.
2. Processing: Performing risk analysis to guide through the entire process.
3. Proper test planning: Designing test cases to cover the entire code. Execute rinse-repeat
until error-free software is reached. Also, the results are communicated.
4. Output: Preparing final report of the entire testing process.
Tools required for White box testing:
 PyUnit
 Sqlmap
 Nmap
 Parasoft Jtest
 Nunit
 VeraUnit
 CppUnit
Features of White box Testing
1. 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.
2. 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.
3. 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.
4. Identifying logical errors: White box testing helps to identify logical errors in the code, such
as infinite loops or incorrect conditional statements.
5. Integration testing: White box testing is useful for integration testing, as it allows testers to
verify that the different components of an application are working together as expected.

6. Unit testing: White box testing is also used for unit testing, which involves testing individual
units of code to ensure that they are working correctly.

Advantages of Whitebox Testing


 Thorough Testing: White box testing is thorough as the entire code and structures are tested.
 Code Optimization: It results in the optimization of code removing errors and helps in
removing extra lines of code.
 Early Detection of Defects: It can start at an earlier stage as it doesn’t require any interface
as in the case of black box testing.
Disadvantages of White box Testing
 Programming Knowledge and Source Code Access: Testers need to have programming
knowledge and access to the source code to perform tests.
 Overemphasis on Internal Workings: Testers may focus too much on the internal workings
of the software and may miss external issues.
 Bias in Testing: Testers may have a biased view of the software since they are familiar with
its internal workings.
Integration testing
o Integration testing is the second level of the software testing process comes
after unit testing. In this testing, units or individual components of the
software are tested in a group. The focus of the integration testing level is to
expose defects at the time of interaction between integrated components or
units.
o Unit testing uses modules for testing purpose, and these modules are combined
and tested in integration testing. The Software is developed with a number of
software modules that are coded by different coders or programmers. The goal
of integration testing is to check the correctness of communication among all
the modules.

o Once all the components or modules are working independently, then we need
to check the data flow between the dependent modules is known
as integration testing.
Integration Testing Techniques
Any testing technique (Blackbox, Whitebox, and Greybox) can be used for
Integration Testing; some are listed below:
Black Box Testing
o State Transition technique
o Decision Table Technique
o Boundary Value Analysis
o All-pairs Testing . etc
White Box Testing
o Data flow testing
o Control Flow Testing
o Branch Coverage Testing
o Decision Coverage Testing
Types of Integration Testing
Integration testing can be classified into two parts:
o Incremental integration testing
o Non-incremental integration testing

Advantages
o Identification of defect is easy.
o Do not need to wait for the development of all the modules as it saves time.
Disadvantages
o Critical modules are tested last due to which the defects can occur.
o There is no possibility of an early prototype.
System Testing
System Testing is a type of software testing that is performed on a complete
integrated system to evaluate the compliance of the system with the
corresponding requirements. In system testing, integration testing passed
components are taken as input.
 The goal of integration testing is to detect any irregularity between the units
that are integrated together. System testing detects defects within both the
integrated units and the whole system.
 The result of system testing is the observed behavior of a component or a
system when it is tested.
 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.
System Testing Process: System Testing is performed in the following steps:
 Test Environment Setup : Create testing environment for the better quality testing.
 Create Test Case: Generate test case for the testing process.
 Create Test Data: Generate the data that is to be tested.
 Execute Test Case: After the generation of the test case and the test data, test cases are executed.
 Defect Reporting: Defects in the system are detected.
 Regression Testing: It is carried out to test the side effects of the testing process.
 Log Defects: Defects are fixed in this step.
 Retest: If the test is not successful then again test is performed.

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 which 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 the varying loads.
 Scalability Testing: Scalability Testing is a type of software testing which is carried
out to check the performance of a software application.

Tools used for System Testing :

1. JMeter
2. Gallen Framework
3. Selenium

Advantages of System Testing:

 Verifies the overall functionality of the system.


 Detects and identifies system-level problems early in the development cycle.
 Helps to validate the requirements and ensure the system meets the user needs.
 Improves system reliability and quality.
 Facilitates collaboration and communication between development and testing teams.

Disadvantages 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.

Alpha Testing
Alpha Testing is a type of software testing performed to identify bugs before releasing the
product to real users or to the public. Alpha Testing is one of the user acceptance tests. It is
the first stage of software testing, during which the internal development team tests the
program before making it available to clients or people outside the company.

Beta Testing

Beta Testing is performed by real users of the software application in a real environment.
Beta testing is one type of User Acceptance Testing. A pre-release version of the product is
made available for testing to a chosen set of external users or customers during the second
phase of software testing.

Acceptance Testing –

Acceptance Testing is a method of software testing where a system is tested for acceptability.
The major aim of this test is to evaluate the compliance of the system with the business
requirements and assess whether it is acceptable for delivery or not.

Acceptance Testing is the last phase of software testing performed after System Testing and
before making the system available for actual use.

Software Maintenance

Software Maintenance refers to the process of modifying and updating a software system
after it has been delivered to the customer. It is a critical part of the software development life
cycle (SDLC) and is necessary to ensure that the software continues to meet the needs of the
users over time.

Several Types of Software Maintenance


1. Corrective Maintenance: This involves fixing errors and bugs in the software system.
2. Patching: It is an emergency fix implemented mainly due to pressure from management.
Patching is done for corrective maintenance but it gives rise to unforeseen future errors due
to lack of proper impact analysis.
3. Adaptive Maintenance: This involves modifying the software system to adapt it to changes
in the environment, such as changes in hardware or software, government policies, and
business rules.
4. Perfective Maintenance: This involves improving functionality, performance, and reliability,
and restructuring the software system to improve changeability.
5. Preventive Maintenance: This involves taking measures to prevent future problems, such as
optimization, updating documentation, reviewing and testing the system, and implementing
preventive measures such as backups.

Software Reverse Engineering

Software Reverse Engineering is the process of recovering the design and the requirements
specification of a product from an analysis of its code. Reverse Engineering is becoming
important, since several existing software products, lack proper documentation, are highly
unstructured, or their structure has degraded through a series of maintenance efforts.

Uses of Software Reverse Engineering


 Malware analysis: Reverse engineering is used to understand how malware works
 Legacy systems: Reverse engineering can be used to understand and maintain legacy
systems that are no longer supported by the original developer.
 Intellectual property protection: Reverse engineering can be used to detect and prevent
intellectual property theft by identifying and preventing the unauthorized use of code or other
assets.
 Security: Reverse engineering is used to identify security vulnerabilities in a system, such as
backdoors, weak encryption, and other weaknesses.

Maintenance Cost estimation


The different cost estimation for software maintenance are-
Hosting and Software Expenses: This includes fees for hosting services. Buying and renewal of
software licenses, or any SaaS subscriptions.
Mobile App Costs: If you're creating a mobile app , consider platform fees for iOS and Android
accounts.
Bug Fixes: Calculate the cost of fixing bugs in your code.
Design Changes: Prepare beforehand for any potential updates to the design.
Plugin and Software Updates: Take into account plugin update costs and third-party software
updates.
Code Improvement: Factor in expenses for code refactoring, if needed.

You might also like