Unit 5 OOSE

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Unit 5- TESTING AND MAINTENANCE

Software Testing Fundamentals

Software testing can be stated as the process of verifying and validating whether a software or application is
bug-free, meets the technical requirements as guided by its design and development, and meets the user
requirements effectively and efficiently by handling all the exceptional and boundary cases.

Software Testing is a method to assess the functionality of the software program. The process checks whether
the actual software matches the expected requirements and ensures the software is bug-free. The purpose of
software testing is to identify the errors, faults, or missing requirements in contrast to actual requirements. It
mainly aims at measuring the specification, functionality, and performance of a software program or
application.

Software testing can be divided into two steps:

Verification: It refers to the set of tasks that ensure that the software correctly implements a specific function.
It means “Are we building the product right?”.

Validation: It refers to a different set of tasks that ensure that the software that has been built is traceable to
customer requirements. It means “Are we building the right product?”.

Importance of Software Testing:

Defects can be identified early: Software testing is important because if there are any bugs they can be
identified early and can be fixed before the delivery of the software.

Improves quality of software: Software Testing uncovers the defects in the software, and fixing them
improves the quality of the software.

Increased customer satisfaction: Software testing ensures reliability, security, and high performance which
results in saving time, costs, and customer satisfaction.

Helps with scalability: Software testing type non-functional testing helps to identify the scalability issues and
the point where an application might stop working.

Saves time and money: After the application is launched it will be very difficult to trace and resolve the
issues, as performing this activity will incur more costs and time. Thus, it is better to conduct software testing
at regular intervals during software development.

Need for Software Testing

Software bugs can cause potential monetary and human loss. There are many examples in history that clearly
depicts that without the testing phase in software development lot of damage was incurred. Below are some
examples:
 1985: Canada’s Therac-25 radiation therapy malfunctioned due to a software bug and resulted in lethal
radiation doses to patients leaving 3 injured and 3 people dead.
 1994: China Airlines Airbus A300 crashed due to a software bug killing 264 people.
 1996: A software bug caused U.S. bank accounts of 823 customers to be credited with 920 million US dollars.
 1999: A software bug caused the failure of a $1.2 billion military satellite launch.
 2015: A software bug in fighter plan F-35 resulted in making it unable to detect targets correctly.
 2015: Bloomberg terminal in London crashed due to a software bug affecting 300,000 traders on the financial
market and forcing the government to postpone the 3bn pound debt sale.
 Starbucks was forced to close more than 60% of its outlet in the U.S. and Canada due to a software failure in
its POS system.
 Nissan cars were forced to recall 1 million cars from the market due to a software failure in the car’s airbag
sensory detectors.

Different Types Of Software Testing

Software Testing can be broadly classified into 3 types:

Functional testing: It is a type of software testing that validates the software systems against the functional
requirements. It is performed to check whether the application is working as per the software’s functional
requirements or not. Various types of functional testing are Unit testing, Integration testing, System testing,
Smoke testing, and so on.
Non-functional testing: It is a type of software testing that checks the application for non-functional
requirements like performance, scalability, portability, stress, etc. Various types of non-functional testing are
Performance testing, Stress testing, Usability Testing, and so on.

Maintenance testing: It is the process of changing, modifying, and updating the software to keep up with the
customer’s needs. It involves regression testing that verifies that recent changes to the code have not adversely
affected other previously working parts of the software.

Apart from the above classification software testing can be further divided into 2 more ways of testing:

Manual testing: It includes testing software manually, i.e., without using any automation tool or script. In this
type, the tester takes over the role of an end-user and tests the software to identify any unexpected behavior or
bug. There are different stages for manual testing such as unit testing, integration testing, system testing, and
user acceptance testing. Testers use test plans, test cases, or test scenarios to test software to ensure the
completeness of testing. Manual testing also includes exploratory testing, as testers explore the software to
identify errors in it.

Automation testing: It is also known as Test Automation, is when the tester writes scripts and uses another
software to test the product. This process involves the automation of a manual process. Automation Testing is
used to re-run the test scenarios quickly and repeatedly, that were performed manually in manual testing.

Apart from Regression testing, Automation testing is also used to test the application from a load,
performance, and stress point of view. It increases the test coverage, improves accuracy, and saves time and
money when compared to manual testing.

Different Types of Software Testing Techniques

Software testing techniques can be majorly classified into two categories:

Black box Testing: Testing in which the tester doesn’t have access to the source code of the software and is
conducted at the software interface without any concern with the internal logical structure of the software
known as black-box testing.

White box Testing: Testing in which the tester is aware of the internal workings of the product, has access to
its source code, and is conducted by making sure that all internal operations are performed according to the
specifications is known as white box testing.

Grey Box Testing: Testing in which the testers should have knowledge of implementation, however, they
need not be experts.

S No. Black Box Testing White Box Testing

Internal workings of an application


Knowledge of the internal workings
1
are not required. is a must.

Also known as closed box/data-


Also known as clear box/structural
2
driven testing. testing.
S No. Black Box Testing White Box Testing

End users, testers, andNormally done by testers and


3
developers. developers.

This can only be done by a trial


Data domains and internal
4
and error method. boundaries can be better tested.

Different Levels of Software Testing

Software level testing can be majorly classified into 4 levels:

Unit testing: It a level of the software testing process where individual units/components of a software/system
are tested. The purpose is to validate that each unit of the software performs as designed.

Integration testing: It is a level of the software testing process where individual units are combined and tested
as a group. The purpose of this level of testing is to expose faults in the interaction between integrated units.

System testing: It is a level of the software testing process where a complete, integrated system/software is
tested. The purpose of this test is to evaluate the system’s compliance with the specified requirements.

Acceptance testing: It is a level of the software testing process where a system is tested for acceptability. The
purpose of this test is to evaluate the system’s compliance with the business requirements and assess whether
it is acceptable for delivery.

Best Practices for Software Testing

Below are some of the best practices for software testing:

Continuous testing: Project teams test each build as it becomes available thus it enables software to be
validated in real environments earlier in the development cycle, reducing risks and improving the functionality
and design.

Involve users: It is very important for the developers to involve users in the process and open-ended questions
about the functionality required in the application. This will help to develop and test the software from the
customer’s perspective.

Divide tests into smaller parts: Dividing tests into smaller fractions save time and other resources in
environments where frequent testing needs to be conducted. This also helps teams to make better analyses of
the tests and the test results.

Metrics and Reporting: Reporting enables the team members to share goals and test results. Advanced tools
integrate the project metrics and present an integrated report in the dashboard that can be easily reviewed by
the team members to see the overall health of the project.
Don’t skip regression testing: Regression testing is one of the most important steps as it encourages the
validation of the application. Thus, it should not be skipped.

Programmers should avoid writing tests: Test cases are usually written before the start of the coding phase so
it is considered a best practice for programmers to avoid writing test cases as they can be biased towards their
code and the application.

Service virtualization: Service virtualization simulates the systems and services that are not yet developed or
are missing. Thus, enabling teams to reduce dependency and start the testing process sooner. They can
modify, and reuse the configuration to test different scenarios without having to alter the original
environment.

Benefits of Software Testing

Product quality: Testing ensures the delivery of a high-quality product as the errors are discovered and fixed
early in the development cycle.

Customer satisfaction: Software testing aims to detect the errors or vulnerabilities in the software early in the
development phase so that the detected bugs can be fixed before the delivery of the product. Usability testing
is a type of software testing that checks the application for how easily usable it is for the users to use the
application.

Cost-effective: Testing any project on time helps to save money and time for the long term. If the bugs are
caught in the early phases of software testing, it costs less to fix those errors.

Security: Security testing is a type of software testing that is focused on testing the application for security
vulnerabilities from internal or external sources.

Internal and External view of Testing

Software Testing Fundamentals

The goal of testing is to find errors, and a good test is one that has a high probability of finding an error. The
product should be testable. “Software testability is simply how easily a computer program can be tested.”
Testability exhibits following characteristics:-

a) Operability:- If a system is designed and implemented with quality in mind, relatively few bugs will block
the execution of tests.

b) Observability:- “What you see is what you test.” Inputs provided as part of testing produce distinct outputs.

c) Controllability:- “The better we can control the software, the more the testing can be automated and
optimized.” All possible outputs can be generated through some combination of input.

d) Decomposability:- By controlling the scope of testing, we can more quickly isolate problems and perform
smarter retesting.
e) Simplicity:- “The less there is to test, the more quickly we can test it.” The program should exhibit
functional simplicity; structural simplicity, and code simplicity.

f) Stability:- “The fewer the changes, the fewer the disruptions to testing.”

g) Understandability:- “The more information we have, the smarter we will test.”

Test Characteristics:- The following attributes of a “good” test:

i. A good test has a high probability of finding an error.

ii. A good test is not redundant. There is no point in conducting a test that has the same purpose as another
test.

iii. A good test should be “best of breed”.

iv. A good test should be neither too simple nor too complex.

INTERNAL AND EXTERNAL VIEWS OF TESTING

Any software can be tested in one of two ways:

(1) Knowing the specified function that a product has been designed to perform, tests can be conducted that
demonstrate each function is fully operational while at the same time searching for errors in each function.

(2) Knowing the internal workings of a product, that is, internal operations are performed according to
specifications and all internal components have been adequately exercised.

The first test approach takes an external view and is called black-box testing. A black-box test examines some
fundamental aspect of a system with little regard for the internal logical structure of the software.

The second requires an internal view and is termed white-box testing. White-box testing of software is
predicated on close examination of procedural detail. White-box testing would lead to “100 percent correct
programs.” All we need do is define all logical paths, develop test cases to exercise them, and evaluate results.

White Box Testing

You might also like