Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Unit-04

Software Testing
• Software testing is the process of testing the software product.
• Testing strategy provides a framework or set of activities which are essential for the success
of the project. they may include planning, designing of test cases, execution of program with
test cases, interpretation of the outcome and finally collection and management of data.
• Testing is the process of executing a program with the intent of finding errors.
• Effective software testing will contribute to the delivery of high quality software product,
more satisfied users, lower maintenance cost, more accurate and reliable result.
• Hence software testing is necessary and important activity of software development process.

Error, Mistake, Bug, Fault and Failure


• People make errors. A good synonym is mistake. This may be a syntax error or
misunderstanding of specifications. Sometimes, there are logical errors.
• When developers make mistakes while coding, we call these mistakes “bugs”.
• A fault is the representation of an error, where representation is the mode of expression,
such as narrative text, data flow diagrams, ER diagrams, source code etc. Defect is a good
synonym for fault.
• A failure occurs when a fault executes. A particular fault may cause different failures,
depending on how it has been exercised.

SOFTWARE TESTING TECHNIQUE


Fundamental Principal of Testing:
The objective of the testing is to provide a quality product to the customer .
1. The goal of testing is to find defects before customers find them out.
2. Exhaustive testing is not possible; program testing can only show the presence of defects,
never their absence.
3. Testing applies all through the software life cycle and is not an end of- cycle activity.
4. Understand the reason behind the test.
5. Test the tests first.

Testing Objective:
The main objective of testing is
1. Testing is a process of executing a program with the intent of finding an error.
2. A good test case is one that has a high probability of finding an as-yet undiscovered error.
3. A successful test is one that uncovers an as-yet-undiscovered error.

Software Verification and Validation


Verification refers to the set of activities that ensure that software correctly implements a
specific function.
Validation refers to a different set of activities that ensure that the software that has been
built is traceable to customer requirements.
Verification: "Are we building the product right?"
Validation: "Are we building the right product?

Levels of Testing
There are 3 levels of testing:
i. Unit Testing
ii. Integration Testing
iii. System Testing
Unit testing is undertaken after a module has been coded and successfully reviewed.
• Unit testing (or module testing) is the testing of different units (or modules) of a system in
isolation.
• In order to test a single module, a complete environment is needed to provide all that is
necessary for execution of the module. That is, besides the module under test itself, the
following steps are needed in order to be able to test the module.

Integration Testing: Integration is the process by which components are aggregated to


create larger components.
Integration Testing is testing done to show that even though the componenets were
individually satisfactory (after passing component testing), checks the combination of
components are incorrect or inconsistent.
• The purpose of unit testing is to determine that each independent module is correctly
implemented. This gives little chance to determine that the interface between modules is also
correct, and for this reason integration testing must be performed.
• Focuses on interaction of modules in a subsystem.
• Unit tested modules combined to form subsystems.
• Test cases to “exercise” the interaction of modules in different ways.

Purpose of Integration Testing is to identify bugs of following Types: These are protocol-
design bugs, input and output format bugs, inadequate protection against corrupted data,
wrong subroutine call sequence, call-parameter bugs, mis-understood entry or exit parameter
values. The entire system is viewed as a collection of subsystems (sets of classes) determined
during the system and object design.
Goal: Test all interfaces between subsystems and the interaction of subsystems. The
Integration testing strategy determines the order in which the subsystems are selected for
testing and integration.
Type of Integration Testing
 Top-down Integration
 Bottom-up Integration
 Regression Testing

TOP-DOWN INTEGRATION: Top-down integration testing is an incremental approach to


construction of program structure. Modules are integrated by moving downward through the
control hierarchy, beginning with the main control module.

BOTTOM-UP INTEGRATION: Bottom-up integration testing, begins construction and


testing with atomic modules. Because components are integrated from the bottom up,
processing required for components subordinate to a given level is always available and the
need for stubs is eliminated.

REGRESSION TESTING: Each time a new module is added as part of integration testing,
the software changes. These changes may cause problems. In the context of an integration
test strategy, regression testing is the re-execution of some subset of tests that have already
been conducted. Regression testing is the activity that helps to ensure that changes do not
introduce unintended behavior or additional errors. Regression testing may be conducted
manually, by re-executing a subset of all test cases

System Testing
System tests are designed to validate a fully developed system to assure that it meets its
requirements. There are essentially three main kinds of system testing:
Alpha Testing. Alpha testing refers to the system testing carried out by the test team within
the developing organization.
Beta testing. Beta testing is the system testing performed by a select group of friendly
customers.
Acceptance Testing. Acceptance testing is the system testing performed by the customer to
determine whether he should accept the delivery of the system.

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 Plan : A test plan outlines the strategy that will be used to test an application, the
resources that will be used, the test environment in which testing will be performed, and the
limitations of the testing and the schedule of the testing activities. Typically, the Quality
Assurance Team Lead will be responsible for writing a Test Plan.
Test Design : Test design is a process that describes “how” testing should be done. It
includes processes for the identifying test cases by enumerating steps of the defined test
conditions. The testing techniques defined in test strategy or plan is used for enumerating the
steps.

Test case:
This is the triplet [I,S,O], where I is the data input to the system, S is the state of the system at
which the data is input, and O is the expected output of the system.

Test suite:
This is the set of all test cases with which a given software product is to be tested.The set of
test cases is called a test suite. Hence any combination of test cases may generate a test suite.

Test case template

Test data
Inputs which have been devised to test the system
Test cases
Inputs to test the system and the predicted outputs from these inputs if the system operates
according to its specification

Test Execution : Test execution is the process of executing the code and comparing the
expected and actual results. Following factors need to be considered for a test execution
process −
 Based on a risk, select a subset of test suite to be executed for this cycle.
 Assign the test cases in each test suite to testers for execution.
 Execute tests, report bugs, and capture test status continuously.
 Resolve blocking issues as they arise.
 Report status, adjust assignments, and reconsider plans and priorities daily.
 Report test cycle findings and status.

Review : A review is a systematic examination of a document by one or more people with the
main aim of finding and removing errors early in the software development life cycle.
Reviews are used to verify documents such as requirements, system designs, code, test plans
and test cases.
Reviews are usually performed manually while static analysis of the tools is performed using
tools.
Inspection : Inspection is the most formal form of reviews, a strategy adopted during static
testing phase.

Characteristics of Inspection :
 Inspection is usually led by a trained moderator, who is not the author. Moderator's
role is to do a peer examination of a document
 Inspection is most formal and driven by checklists and rules.
 This review process makes use of entry and exit criteria.
 It is essential to have a pre-meeting preparation.
 Inspection report is prepared and shared with the author for appropriate actions.
 Post Inspection, a formal follow-up process is used to ensure a timely and a prompt
corrective action.
 Aim of Inspection is NOT only to identify defects but also to bring in for process
improvement.

Audit : Audit means an independent examination of a software product or processes to assess


compliance with specifications, standards, contractual agreements, or other criteria.
The terminology, Audit in the field of software can relate to any of the following:
 A software Quality Assurance, where the software is audited for quality
 A software licensing audit, where a user of software is audited for licence compliance
 A Physical Configuration Audit (PCA) is the formal examination to verify the
configuration item's product baseline

Recent Trends in Software Design/Specialized Software Testing, Related Tools and


Standards
1. Big Data It played an essential role in a variety of business sectors including technology,
healthcare, banking and many more. Big data testing will address several issues and results in
the efficiency of processing, and the rapid import of data.

2. Machine Learning test suite optimization, search for unique code checks, improving the
log analytics etc. In 2020, machine learning is going to come up with new concepts while
helping in various aspects like test suite optimization, search for unique code checks,
improving log analytics, etc..
3. DevOps Development DevOps has become a widely accepted solution for organizations
that are willing to shorten the software life cycles from development to delivery and
operation.

4. Test Automation There seems to be a trend of transition to automatic verification of


various processes and code as every enterprise wants to get maximum benefits from the
product. Test automation solutions will help you attain high-quality outputs with the help of
automation.

5. IoT Testing Another challenge for IoT testers in the upcoming years lies in strategies.
According to the World Quality Report, 34% of respondents said their products have IoT
functionality, but their team still can not find out the most proper testing strategy.

6. Block-chain Testing Block-chain is improving financial transactions in a far better way. It


also brings along few security challenges as well. To address these security issues, next-gen
block-chain testing services will be carried out that are specifically designed for more
productive Block-chain apps.

7. Cyber Security Testing With the digital evolution on the hype there comes many security
threats. As cyber threats can take place in any form and at any moment, testing for security
will be a popular topic this year.

You might also like