0% found this document useful (0 votes)
15 views

Testing and Debuging

Uploaded by

akandebeatrice08
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Testing and Debuging

Uploaded by

akandebeatrice08
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

TESTING AND DEBUGGING

1. Testing
Testing Techniques is the method applied to evaluate a system or a component with a purpose to
find if it satisfies the given requirements. Testing of a system helps to identify gaps, errors, or
any kind of missing requirements differing from the actual requirements. Testing techniques are
the best practices used by the testing team to assess the developed software in regards to a given
requirements. These techniques ensure the overall quality of the product or software including
performance, security, customer experience, and so on. Testing is a five-fold system for any
testing that the user wants to do. They are:

a. Testers – Users who perform the testing


b. Coverage – What components gets covered
c. Potential problems – Reason for testing, is to find errors?
d. Activities – The way you test or how you test
e. Evaluation – Compare the results to know if the test is successful or unsuccessful

All types of testing involve the above five dimensions. The testing techniques enable the user to
focus on one or more dimensions to achieve the result.

2. Testing categories
Static and Dynamic testing are the two testing approaches that are occasionally inseparable but
are mostly discussed separately. The Static testing approach is done without executing the
program and is called “verification activities”, while the Dynamic testing approach involves
executing the program with real inputs, most of the current literature refers to the dynamic
testing as “testing”.

a) Static Testing:
This involves source code only and it deals with program and symbolic analysis, model
checking, error handling, and code inspection to ensure functional requirements, design, and
coding standards are observed and estimate program quality without any reference to actual
executions. Desk checking, Code walkthrough, and Formal inspections are the commonly
used techniques here.
b) Dynamic Testing:
This involves actual code executions to ascertain and/or approximate software quality and it
deals with a combination of inputs, use of structurally dictated testing procedures, and
automation of testing environment generation to test the internal design of the software.

3. Testing Techniques
Based on the requirements of the software, a suitable testing technique is employed. Each testing
technique offers various features and benefits to serve the purpose better.
Though there are several types of testing techniques available, we shall focus on Black box
testing and White box testing.

Black Box Testing


Black box testing is a type of software testing, which checks for the functionality of a software or
an application without knowing the design, internal components, or structure of an application to
be tested. It is also referred to as Specifications-based testing. The black box testing method is
mainly used to find missing functions, performance errors, and initialization errors. The testing
techniques of black-box testing include
a. Equivalence Partitioning – In equivalence partitioning, the input data of an application
to be tested group into equal partitions. This technique ensures to cover each partition at
least once.
b. Boundary Value Analysis – In boundary value analysis is a technique used in which the
testing of an application is done using the boundary values.
c. Cause-effect Graph – In this type of testing technique, causes are the inputs of a
program and effects as the outputs of the program. Here, a graphical representation is
used to show the relationship between the input and output and the factors that impact the
outcome.
d. Error Guessing – The error guessing testing method utilizes the skills and experience of
the tester to detect errors when tools fail to do.
e. All-pairs Testing – In this approach, the software is tested using a combinatorial method
to test all the possible discrete combinations of the parameters involved.

White Box Testing


White box testing is a method of software testing that tests internal programming structures of an
application. This type of testing technique is known as clear box testing, open box testing,
structural testing, and transparent box testing. Its operation is opposite to black-box testing and is
used at unit, integration, and system levels of the testing process. The testing techniques of
white-box testing include:
a. Statement Coverage – In this technique, all programming statements are applied with a
minimal number of tests.
b. Branch Coverage – In this type of technique, all branches shall be tested by running
them a sequence of tests.
c. Path Coverage – All paths including statements and branches are tested using this
technique.

4. Types of Testing Techniques


Software testing is a method used to ensure that a software application is tested for software bugs
and also checks if the developed software meets the specific requirements to produce a quality
product. Software testing techniques are classified as shown in the figure below.
Figure 1: Types of Testing

Functional Testing
Functional testing is an approach that is used to verify every functionality of the software and
each function complies with the given requirement. Functional testing is divided into four types:
a. Unit Testing
In unit testing, each component or individual units of the software shall be tested. The
aim of the unit testing is to check internal data structures, logic, boundary conditions for
input and output data as per the design.
b. Integration Testing
In integration testing, individual units are integrated and tested to understand if the
integrated components work efficiently.
c. System Testing
The purpose of system testing is to verify that all the system elements are tested and its
overall function and performance comply with the specific requirements. In this
approach, the system’s hardware and software components are integrated and tested as a
whole.
d. Acceptance Testing
Is the developed software ready for delivery? This type of testing helps to identify if the
application is ready for delivery and meets the business requirements. Alpha testing and
Beta testing are the two types of acceptance testing.

Non-functional Testing
The non-functional attributes of software such as performance, usability, security, reliability, and
quality are tested in non-functional types of testing. The quality and performance of the software
can be enhanced with non-functional testing. Various types of non-functional testing include:
a. Performance testing
Performance testing is performed to ensure that the software applications should be able
to handle the workload well with increased performance. There are four kinds of
performance testing, which include Load testing, Stress testing, Endurance testing, Spike
testing.
b. Security testing
Security experts use the security level of testing to ensure that the system and application
are protected from all types of loopholes. This testing provides security to the application
and protects the loss of information.
c. Usability testing
The usability testing checks for usability and user-friendliness of the software. This test is
performed to determine if the software is seamless to use by any user.
d. Compatibility testing
In this level of testing, compatibility of the software is tested for different operating
system, internet browsers, and so on. Such as an Android app is checked if it is
compatible with different versions of Android OS.

5. Advantages and Disadvantages of Testing Techniques


Advantages
Some of the foremost advantages are
a) Highly efficient
b) Quality
c) Satisfies customer
d) Good product, good revenue
e) User experience
f) Business optimization
Disadvantages
Some of the disadvantages are:
a) Appropriate communication and coordination with the tester
b) Competition among similar service providers
c) Lack of experienced professionals
d) Finding the right service provider

7. Debugging
The important technique to find and remove the number of errors or bugs or defects in a program
is called Debugging. It is a multistep process in software development. It involves identifying the
bug, finding the source of the bug and correcting the problem to make the program error-free. In
software development, the developer can locate the code error in the program and remove it

8. Debugging Techniques
To perform the debugging process easily and efficiently, it is necessary to follow some
techniques. The most commonly used debugging strategies are,
a) Debugging by brute force
b) Induction strategy
c) Deduction strategy
d) Backtracking strategy and
e) Debugging by testing.

a) Debugging by brute force is the most commonly used technique. This is done by taking
memory dumps of the program which contains a large amount of information with
intermediate values and analyzing them, but analyzing the information and finding the
bugs leads to a waste of time and effort.
b) Induction strategy includes the Location of relevant data, the Organization of data, the
devising hypothesis (provides possible causes of errors), and the proving hypothesis.
c) Deduction strategy includes Identification of possible causes of bugs or hypothesis
elimination of possible causes using the information refining of the hypothesis (analyzing
one-by-one)
d) The backtracking strategy is used to locate errors in small programs. When an error
occurs, the program is traced one step backward during the evaluation of values to find
the cause of bug or error.
e) Debugging by testing is the conjunction with debugging by induction and debugging by
deduction technique. The test cases used in debugging are different from the test cases
used in the testing process.

9. The Four Steps of Debugging


To debug a program; No matter which language and platform you are using, the following
concept will help;
a. Identify
Identify is the first step in the debugging, it means discover what is the bug and why it
happen. We need to identify the way to reproduce the problem and the root cause of the
problem if we cannot sort out, sorry that we probably cannot solve the problem;
b. Isolate
Isolate is a step to separate the buggy code with other healthy code; I usually make an
Unit Test referencing that part of code and then reproduce the bug using that unit test;
Isolation has the following advantages:
a) Won’t affect other code
b) Save time to repeat the testing steps
c) Easy to examine difference cases using the buggy code;
If you found that it is hard to make a unit test for the code, try to refactor your code
first base on SRP (Single Responsibility Principle) first; this step is usually ignored by
developers; we could skip this but it is likely to cause bad things happened such as poor
effectively or making more bugs.
c. Fix
Fix is a step to correct the buggy code; this step is the core part of debugging; If the
above two steps are doing well, it should be easy to handle this step;
Here are some tips about fixing codes:
a) Understand your code & Understand the libraries you are using;
b) Read the Document of those functions you are using;
c) Code Walkthrough
d) Make unit tests to test the suspicious statement
e) Open Debug Mode
f) Work with debugger
g) Try to refactoring or re-design the architecture (worst case scenario)

d. Review
Review is a step to ensure the bug you fixed is working correctly now. Also the changes
are not affecting other parts of the application and working properly in the target
platform;

Debugging is the inevitable work in programming and I could say it is the most annoying work
in programming because it is time consuming and will not create any extra values.

10. Differences between Testing and Debugging


Testing
Testing is the process of verifying and validating that 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 with handling all the exceptional and boundary cases.

Debugging
Debugging is the process of fixing a bug in the software. It can define as the identifying,
analyzing and removing errors. This activity begins after the software fails to execute properly
and concludes by solving the problem and successfully testing the software. It is considered to be
an extremely complex and tedious task because errors need to be resolved at all stages of
debugging. Table 1 outlined the differences between Testing and Debugging
Table 1: difference between Testing and Debugging:
Testing Debugging

Testing is the process to find bugs and Debugging is the process to correct the bugs
errors. found during testing.

It is the process to identify the failure of It is the process to give the absolution to
implemented code. code failure.

Testing is the display of errors. Debugging is a deductive process.

Debugging is done by either programmer or


Testing is done by the tester.
developer.

There is no need of design knowledge in the Debugging can’t be done without proper
testing process. design knowledge.

Testing can be done by insider as well as Debugging is done only by insider. Outsider
outsider. can’t do debugging.

Debugging is always manual. Debugging


Testing can be manual or automated.
can’t be automated.

It is based on different testing levels i.e. unit Debugging is based on different types of
testing, integration testing, system testing etc. bugs.

Debugging is not an aspect of software


Testing is a stage of software development
development life cycle, it occurs as a
life cycle (SDLC).
consequence of testing.

While debugging process seeks to match


Testing is composed of validation and
symptom with cause, by that it leads to the
verification of software.
error correction.

Debugging commences with the execution of


Testing is initiated after the code is written.
a test case

You might also like