Name - Bharti Pallavi Arjun Roll No. - 18141112 Q.1) List Testing Objectives and Explain Testing Principles. Ans

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Tutorial No.

09
Name – Bharti Pallavi Arjun

Roll No. - 18141112

Q.1) List testing objectives and explain testing principles.

Ans :

According to Glen Myers textbook, testing objectives are as follows :

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 testing principals as suggested by Davis are :

• All tests should be traceable to customer requirements : As we have seen, the


objective of software testing is to uncover errors. It follows that the most severe defects
(from the customer’s point of view) are those that cause the program to fail to meet its
requirements.

• Tests should be planned long before testing begins : Test planning can begin as soon
as the requirements model is complete. Detailed definition of test cases can begin as soon
as the design model has been solidified. Therefore, all tests can be planned and designed
before any code has been generated.

• The Pareto principle applies to software testing : Stated simply, the Pareto principle
implies that 80 percent of all errors uncovered during testing will likely be traceable to 20
percent of all program components. The problem, of course, is to isolate these suspect
components and to thoroughly test them.

• Testing should begin “in the small” and progress toward testing “in the large.” :
The first tests planned and executed generally focus on individual components. As testing
progresses, focus shifts in an attempt to find errors in integrated clusters of components
and ultimately in the entire system.

• Exhaustive testing is not possible : The number of path permutations for even a
moderately sized program is exceptionally large. For this reason, it is impossible to
execute every combination of paths during testing. It is possible, however, to adequately
cover program logic and to ensure that all conditions in the component-level design have
been exercised.

• To be most effective, testing should be conducted by an independent third party :


By most effective, we mean testing that has the highest probability of finding errors (the
primary objective of testing). The software engineer who created the system is not the
best person to conduct all tests for the software.
Q.2) Explain strategic approach to software testing.

Ans :

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 fulfils the specifies requirements or not.

According to Glen Myers, software testing has the following objectives:

 The process of investigating and checking a program to find whether there is an error
or not and does it fulfill the requirements or not is called testing.
 When the number of errors found during the testing is high, it indicates that the testing
was good and is a sign of good test case.
 Finding an unknown error that’s wasn’t discovered yet is a sign of a successful and a
good test case.

The main objective of software testing is to design the tests in such a way that it
systematically finds different types of errors without taking much time and effort so that less
time is required for the development of the software.

The overall strategy for testing software includes:


 Before testing starts, it’s necessary to identify and specify the requirements of the
product in a quantifiable manner.
Different characteristics quality of the software is there such as maintainability that means the
ability to update and modify, the probability that means to find and estimate any risk, and
usability that means how it can easily be used by the customers or end-users. All these
characteristic qualities should be specified in a particular order to obtain clear test results
without any error.

 Specifying the objectives of testing in a clear and detailed manner.


Several objectives of testing are there such as effectiveness that means how effectively the
software can achieve the target, any failure that means inability to fulfil the requirements and
perform functions, and the cost of defects or errors that mean the cost required to fix the
error. All these objectives should be clearly mentioned in the test plan.

 For the software, identifying the user’s category and developing a profile for each
user.
Use cases describe the interactions and communication among different classes of users and
the system to achieve the target. So as to identify the actual requirement of the users and then
testing the actual use of the product.

 Developing a test plan to give value and focus on rapid-cycle testing.


Rapid Cycle Testing is a type of test that improves quality by identifying and measuring the
any changes that need to be required for improving the process of software. Therefore, a test
plan is an important and effective document that helps the tester to perform rapid cycle
testing.

Robust software is developed that is designed to test itself.


The software should be capable of detecting or identifying different classes of errors.
Moreover, software design should allow automated and regression testing which tests the
software to find out if there is any adverse or side effect on the features of software due to
any change in code or program.

 Before testing, using effective formal reviews as a filter.


Formal technical reviews is technique to identify the errors that are not discovered yet. The
effective technical reviews conducted before testing reduces a significant amount of testing
efforts and time duration required for testing software so that the overall development time of
software is reduced.

 Conduct formal technical reviews to evaluate the nature, quality or ability of the test
strategy and test cases.
The formal technical review helps in detecting any unfilled gap in the testing approach.
Hence, it is necessary to evaluate the ability and quality of the test strategy and test cases by
technical reviewers to improve the quality of software.
 For the testing process, developing a approach for the continuous development.
As a part of a statistical process control approach, a test strategy that is already measured
should be used for software testing to measure and control the quality during the development
of software.

Q.3) Write note on i) unit testing ii) integration testing.

Ans :

i)Unit Testing :
Unit Testing is a software testing technique by means of which individual units of software
i.e. group of computer program modules, usage procedures and operating procedures are
tested to determine whether they are suitable for use or not. It is a testing method using which
every independent modules are tested to determine if there are any issue by the developer
himself. It is correlated with functional correctness of the independent modules.

In SDLC or V Model, Unit testing is first level of testing done before integration testing. Unit
testing is such type of testing technique that is usually performed by the developers. Although
due to reluctance of developers to tests, quality assurance engineers also do unit testing.

Objective of Unit Testing:


The objective of Unit Testing is:

1. To isolate a section of code.


2. To verify the correctness of code.
3. To test every function and procedure.
4. To fix bug early in development cycle and to save costs.
5. To help the developers to understand the code base and enable them to make changes
quickly.
6. To help for code reuse.

Types of Unit Testing:


There are 2 type of Unit Testing: Manual, and Automated.

Workflow of Unit Testing:


Unit Testing Tools:
Here are some commonly used Unit Testing tools:
1. Jtest
2. Junit
3. NUnit
4. EMMA
5. 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 to test parts of the project without waiting for others to be
completed.

ii)Integration Testing :
Integration testing is the process of testing the interface between two software units or
module. It’s focus on determining the correctness of the interface. The purpose of the
integration testing is to expose faults in the interaction between integrated units. Once all the
modules have been unit tested, integration testing is performed.

Integration test approaches –


There are four types of integration testing approaches. Those approaches are the following:

1. Big-Bang Integration Testing –


It is the simplest integration testing approach, where all the modules are combining and
verifying the functionality after the completion of individual module testing. In simple words,
all the modules of the system are simply put together and tested. This approach is practicable
only for very small systems. If once an error is found during the integration testing, it is very
difficult to localize the error as the error may potentially belong to any of the modules being
integrated. So, debugging errors reported during big bang integration testing are very
expensive to fix.

Advantages:

 It is convenient for small systems.

Disadvantages:

 There will be quite a lot of delay because you would have to wait for all the modules
to be integrated.
 High risk critical modules are not isolated and tested on priority since all modules are
tested at once.
2. Bottom-Up Integration Testing –
In bottom-up testing, each module at lower levels is tested with higher modules until all
modules are tested. The primary purpose of this integration testing is, each subsystem is to
test the interfaces among various modules making up the subsystem. This integration testing
uses test drivers to drive and pass appropriate data to the lower level modules.

Advantages:

 In bottom-up testing, no stubs are required.


 A principle advantage of this integration testing is that several disjoint subsystems can
be tested simultaneously.

Disadvantages:

 Driver modules must be produced.


 In this testing, the complexity that occurs when the system is made up of a large
number of small subsystem.

3. Top-Down Integration Testing –


Top-down integration testing technique used in order to simulate the behaviour of the lower-
level modules that are not yet integrated.In this integration testing, testing takes place from
top to bottom. First high-level modules are tested and then low-level modules and finally
integrating the low-level modules to a high level to ensure the system is working as intended.

Advantages:

 Separately debugged module.


 Few or no drivers needed.
 It is more stable and accurate at the aggregate level.

Disadvantages:

 Needs many Stubs.


 Modules at lower level are tested inadequately.

4. Mixed Integration Testing –


A mixed integration testing is also called sandwiched integration testing. A mixed integration
testing follows a combination of top down and bottom-up testing approaches. In top-down
approach, testing can start only after the top-level module have been coded and unit tested. In
bottom-up approach, testing can start only after the bottom level modules are ready. This
sandwich or mixed approach overcomes this shortcoming of the top-down and bottom-up
approaches. A mixed integration testing is also called sandwiched integration testing.
Advantages:

 Mixed approach is useful for very large projects having several sub projects.
 This Sandwich approach overcomes this shortcoming of the top-down and bottom-up
approaches.

Disadvantages:

 For mixed integration testing, require very high cost because one part has Top-down
approach while another part has bottom-up approach.
 This integration testing cannot be used for smaller system with huge interdependence
between different modules.

You might also like