Software Testing Unit 1
Software Testing Unit 1
Unit-1
1.1What is Software Testing
Software testing provides an independent view and objective of the software and
gives surety of fitness of the software. It involves testing of all components under the
required services to confirm that whether it is satisfying the specified requirements or
not. The process is also providing the client with information about the quality of the
software.
Testing is mandatory because it will be a dangerous situation if the software fails any
of time due to lack of testing. So, without testing software cannot be deployed to the
enduser.
1 Department of
CE,SCET
Software testing VIISEM
1.2Type of Software testing
Manual testing
The process of checking the functionality of an application as per the customer needs
without taking any help of automation tools is known as manual testing. While
performing the manual testing on any application, we do not need any specific
knowledge of any testing tool, rather than have a proper understanding of the product
so we can easily prepare the test document.
Manual testing can be further divided into three types of testing, which are as follows:
Automation testing
Automation testing is a process of converting any manual test cases into the test
scripts with the help of automation tools, or any programming language is known as
automation testing. With the help of automation testing, we can enhance the speed of
our test execution because here, we do not require any human efforts. We need to
write a test script and execute those scripts.
2 Department of
CE,SCET
Software testing VIISEM
SDLC is a process that creates a structure of development of software. There are
different phases within SDLC, and each phase has its various activities. It makes the
development team able to design, create, and deliver a high-quality product.
SDLC describes various phases of software development and the order of execution
of phases. Each phase requires deliverable from the previous phase in a life cycle of
software development. Requirements are translated into design, design into
development and development into testing; after testing, it is given to the client.
1. Requirement Phase
This is the most crucial phase of the software development life cycle for the
developing team as well as for the project manager. During this phase, the client states
requirements, specifications, expectations, and any other special requirement related
to the product or software. All these are gathered by the business manager or project
manager or analyst of the service providing company.
The requirement includes how the product will be used and who will use the product
to determine the load of operations. All information gathered from this phase is
critical to developing the product as per the customer requirements.
2. Design Phase
The design phase includes a detailed analysis of new software according to the
requirement phase. This is the high priority phase in the development life cycle of a
system because the logical designing of the system is converted into physical
designing. The output of the requirement phase is a collection of things that are
required, and the design phase gives the way to accomplish these requirements. The
decision of all required essential tools such as programming language like
Java, .NET, PHP, a database like Oracle, MySQL, a combination of hardware and
software to provide a platform on which software can run without any problem is
taken in this phase.
There are several techniques and tools, such as data flow diagrams, flowcharts,
decision tables, and decision trees, Data dictionary, and the structured dictionary are
used for describing the system design.
After the successful completion of the requirement and design phase, the next step is
to implement the design into the development of a software system. In this phase,
work is divided into small units, and coding starts by the team of developers
according to the design discussed in the previous phase and according to the
requirements of the client discussed in requirement phase to produce the desired
result.
3 Department of
CE,SCET
Software testing VIISEM
Front-end developers develop easy and attractive GUI and necessary interfaces to
interact with back-end operations and back-end developers do back-end coding
according to the required operations. All is done according to the procedure and
guidelines demonstrated by the project manager.
Since this is the coding phase, it takes the longest time and more focused approach for
the developer in the software development life cycle.
4. Testing Phase
Testing is the last step of completing a software system. In this phase, after getting the
developed GUI and back-end combination, it is tested against the requirements stated
in the requirement phase. Testing determines whether the software is actually giving
the result as per the requirements addressed in the requirement phase or not. The
Development team makes a test plan to start the test. This test plan includes all types
of essential testing such as integration testing, unit testing, acceptance testing, and
system testing. Non-functional testing is also done in this phase.
If there are any defects in the software or it is not working as per expectations, then
the testing team gives information to the development team in detail about the issue.
If it is a valid defect or worth to sort out, it will be fixed, and the development team
replaces it with the new one, and it also needs to be verified.
When software testing is completed with a satisfying result, and there are no
remaining issues in the working of the software, it is delivered to the customer for
their use.
As soon as customers receive the product, they are recommended first to do the beta
testing. In beta testing, customer can require any changes which are not present in the
software but mentioned in the requirement document or any other GUI changes to
make it more user-friendly. Besides this, if any type of defect is encountered while a
customer using the software; it will be informed to the development team of that
particular software to sort out the problem. If it is a severe issue, then the
development team solves it in a short time; otherwise, if it is less severe, then it will
wait for the next version.
After the solution of all types of bugs and changes, the software finally deployed to
the end-user.
6. Maintenance
The maintenance phase is the last and long-lasting phase of SDLC because it is the
process which continues until the software's life cycle comes to an end. When a
customer starts using software, then actual problems start to occur, and at that time
there's a need to solve these problems. This phase also includes making changes in
hardware and software to maintain its operational effectiveness like to improve its
performance, enhance security features and according to customer's requirements with
4 Department of
CE,SCET
Software testing VIISEM
upcoming time. This process to take care of product time to time is called
maintenance.
Project Planning
Requirements Management
Structured design with use of information hiding and encapsulation, design and code
reuse, inspections and reviews, product and process measurements, education and
training of software professionals, development and application of CASE tools, use of
effective testing techniques and integration of testing activities into the entire life
cycle.
Designed
Implemented
Evaluate
6 Department of
CE,SCET
Software testing VIISEM
Maintained
Inconsistent behaviour,
It is difficult for developers to effectively test their own code. A tester needs very
good programming experience in order to understand how code is constructed, and to
know where and what types of, defects could occur.
A tester should work with the developers to produce high-quality software that meets
the customers’ requirements.
7 Department of
CE,SCET
Software testing VIISEM
Teams of testers and developers are very common in industry, and projects should
have a correct developer/tester ratio. The ratio will vary depending on
Available resources,
Type of project,
TMM level.
Project Schedules
A testers also need to work with requirements engineers to make sure that
requirements are testable, and to plan for system and acceptance test.
Testers also need to work with designers to plan for integration and unit test.
Testing standards,
Polices,
Goals.
Testers also need to cooperate with software quality assurance staff and software
engineering process group members.
Testers are a part of the development group. They concentrate on testing. They may
be part of the software quality assurance group. Testers are specialists, their main
function is to plan, execute, record, and analyse tests. They do not debug software.
When defects are detected during testing, software should be returned to the
developers.
The developers locate the defect and repair the code. The developers have a detailed
understanding of the code, and they can perform debugging better.
Testers need the support of management. Testers ensure that developers release code
with few or no defects, and that marketers can deliver software that satisfies the
customers’ requirements, and is reliable, usable, and correct.
8 Department of
CE,SCET
Software testing VIISEM
Defects are defined as the deviation of the actual and expected result
of system or software application. Defects can also be defined as any
deviation or irregularity from the specifications mentioned in the
product functional specification document. Defects are caused by the
developer in development phase of software.
Types of Defects: Following are some of the basic types of defects in the software
development:
1. Arithmetic Defects: It include the defects made by the developer in some
arithmetic expression or mistake in finding solution of such arithmetic
expression. This type of defects are basically made by the programmer due to
access work or less knowledge. Code congestion may also lead to the arithmetic
defects as programmer is unable to properly watch the written code.
2. Logical Defects: Logical defects are mistakes done regarding the
implementation of the code. When the programmer doesn’t understand the
problem clearly or thinks in a wrong way then such types of defects happen.
Also while implementing the code if the programmer doesn’t take care of the
corner cases then logical defects happen. It is basically related to the core of the
software.
3. Syntax Defects: Syntax defects means mistake in the writing style of the code.
It also focuses on the small mistake made by developer while writing the code.
Often the developers do the syntax defects as there might be some small
symbols escaped. For example, while writing a code in C++ there is possibility
that a semicolon(;) is escaped.
4. Multithreading Defects: Multithreading means running or executing the
multiple tasks at the same time. Hence in multithreading process there is
possibility of the complex debugging. In multithreading processes sometimes
there is condition of the deadlock and the starvation is created that may lead to
system’s failure.
5. Interface Defects: Interface defects means the defects in the interaction of the
software and the users. The system may suffer different kinds of the interface
testing in the forms of the complicated interface, unclear interface or the
platform based interface.
6. Performance Defects: Performance defects are the defects when the system or
the software application is unable to meet the desired and the expected results.
When the system or the software application doesn’t fulfill the users’s
9 Department of
CE,SCET
Software testing VIISEM
requirements then that is the performance defects. It also includes the response
of the system with the varying load on the system.
7. software error: A software error occurs during the development of the
software. This error can be in the form of a grammatical error, a logical error
where the outcome of a sequence of executions will not result in what was
intended or a misinterpretation of the user requirements in the actual written
code. It may be in the form of user documentation not matching the software
applications operation. An error may or may not be
detected during the coding or testing of the program before it is released to a
customer.
8. Software Fault: A software fault occurs as a result of an error that remains in
the executing program. Not all faults however are detected and the software may
continue executing without any obvious problems. There are cases where
software faults go undetected for many years of a programs existence.
9. Software Failure: A software failure is a fault that results in a detectable
problem; hence it is referred to as a failure. A failure would cause the
application to malfunction in an obvious manner that warrants the attention of
system maintenance.
10. Boundary and Range Defects: These defects relate to issues where the
software does not handle inputs or data outside of specified boundaries or ranges
correctly. For example, not handling edge cases or boundary values
appropriately.
11. Data Validation Defects: It involves failing to validate user inputs, leading to
potential security vulnerabilities or incorrect data handling.
12. Deployment Defects: It includes setup mistakes, installation issues and
problems that stop the software from functioning properly in a real-world
setting.
13. Integration Defects: When different software modules or components do not
function well together, integration errors result. Problems with data
synchronization, communication, and functionality may result from this.
14. Documentation Defects: These refer to errors or issues in the accompanying
documentation, including user manuals, help files or API documentation.
Incomplete or inaccurate documentation can lead to user confusion.
15. Data Defects: These can result in data corruption or loss, inconsistent data
storage or issues with data retrieval. For example, data validation errors could
lead to incorrect data being stored.
Software engineers and test specialists should follow the examples of engineers in
other disciplines who make use of defect data. A requirement for repository
development should be a part of testing and/or debugging policy statements.
Forms and templates should be designed to collect the data. Each defect and
frequency of occurrence must be recorded after testing.
Defect monitoring should be done for each on-going project. The distribution of
defects will change when changes are made to the process.
10 Department of
CE,SCET
Software testing VIISEM
The defect data is useful for test planning. It is a TMM level 2 maturity goal. It helps
a tester to select applicable testing techniques, design the test cases, and allocate the
amount of resources needed to detect and remove defects. This allows tester to
estimate testing schedules and costs.
The defect data can support debugging activities also. A defect repository can help in
implementing several TMM maturity goals including
Test measurement
Functional testing is a type of software testing in which the system is tested against
the functional requirements of the system. It is conducted to ensure that the
requirements are properly satisfied by the application. Functional testing verifies
that each function of the software application works in conformance with the
requirement and specification. Boundary Value Analysis(BVA) is one of the
functional testings
Boundary Value Analysis is based on testing the boundary values of valid and
invalid partitions. The behavior at the edge of the equivalence partition is more
likely to be incorrect than the behavior within the partition, so boundaries are an
area where testing is likely to yield defects.It checks for the input values near the
boundary that have a higher chance of error. Every partition has its maximum and
minimum values and these maximum and minimum values are the boundary values
of a partition.
11 Department of
CE,SCET
Software testing VIISEM
A boundary value for a valid partition is a valid boundary value.
A boundary value for an invalid partition is an invalid boundary value.
For each variable we check-
o Minimum value.
o Just above the minimum.
o Nominal Value.
o Just below Max value.
o Max value.
Example: Consider a system that accepts ages from 18 to 56.
Valid Test cases: Valid test cases for the above can be any value entered greater
than 17 and less than 57.
Enter the value- 18.
Enter the value- 19.
Enter the value- 37.
Enter the value- 55.
Enter the value- 56.
Invalid Testcases: When any value less than 18 and greater than 56 is entered.
Enter the value- 17.
Enter the value- 57.
Single Fault Assumption: When more than one variable for the same application is
checked then one can use a single fault assumption. Holding all but one variable to
the extreme value and allowing the remaining variable to take the extreme value.
For n variable to be checked:
Maximum of 4n+1 test cases
12 Department of
CE,SCET
Software testing VIISEM
Validation
Verification
Bug It can find the bugs in the It can only find the bugs that
early stage of the could not be found by the
development. verification process.
13 Department of
CE,SCET
Software testing VIISEM
Validation
Verification
14 Department of
CE,SCET