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

What Is Software Testing

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

What Is Software Testing

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

What is Software Testing

Software testing is a process of identifying the correctness of software by


considering its all attributes (Reliability, Scalability, Portability, Re-
usability, Usability) and evaluating the execution of software components
to find the software bugs or errors or defects.

What is Testing
Testing is a group of techniques to determine the correctness of the
application under the predefined script but, testing cannot find all the
defect of application.

Type of Software testing


We have various types of testing available in the market, which are used
to test the application or the software.

With the help of below image, we can easily understand the type 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.

Manual testing can be further divided into three types of testing, which
are as follows:

o White box testing


o Black box testing
o Gray box testing

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.

White Box Testing


 white box testing which also known as glass box is testing,
structural testing, clear box testing, open box testing and
transparent box testing.

 It tests internal coding and infrastructure of a software focus on


checking of predefined inputs against expected and desired outputs.

 It is based on inner workings of an application and revolves around


internal structure testing. In this type of testing programming skills
are required to design test cases.

 The primary goal of white box testing is to focus on the flow of


inputs and outputs through the software and strengthening the
security of the software.

 The white box testing contains various tests, which are as follows:

1. Path testing
2. Loop testing
3. Condition testing
4. Testing based on the memory perspective
5. Test performance of the program
Path testing
In the path testing, we will write the flow graphs and test all independent
paths. Here writing the flow graph implies that flow graphs are
representing the flow of the program and also show how every program is
added with one another as we can see in the below image:

Loop testing
In the loop testing, we will test the loops such as while, for, and do-while,
etc. and also check for ending condition if working correctly and if the size
of the conditions is enough.

For example: we have one program where the developers have given
about 50,000 loops.

1. {
2. while(50,000)
3. ……
4. ……
5. }
We cannot test this program manually for all the 50,000 loops cycle. So we write
a small program that helps for all 50,000 cycles, as we can see in the below
program, that test P is written in the similar language as the source code
program, and this is known as a Unit test. And it is written by the developers
only.

1. Test P
2. {
3. ……
4. …… }

As we can see in the below image that, we have various requirements


such as 1, 2, 3, 4. And then, the developer writes the programs such as
program 1,2,3,4 for the parallel conditions. Here the application contains
the 100s line of codes.

The developer will do the white box testing, and they will test all the five
programs line by line of code to find the bug. If they found any bug in any of the
programs, they will correct it. And they again have to test the system then this
process contains lots of time and effort and slows down the product release time.
Now, suppose we have another case, where the clients want to modify the
requirements, then the developer will do the required changes and test all four
program again, which take lots of time and efforts.

These issues can be resolved in the following ways:

In this, we will write test for a similar program where the developer writes
these test code in the related language as the source code. Then they
execute these test code, which is also known as unit test programs.
These test programs linked to the main program and implemented as
programs.

Therefore, if there is any requirement of modification or bug in the code,


then the developer makes the adjustment both in the main program and
the test program and then executes the test program.

Condition testing
In this, we will test all logical conditions for both true and false values;
that is, we will verify for both if and else condition.
For example:

1. if(condition) - true
2. {
3. …..
4. ……
5. ……
6. }
7. else - false
8. {
9. …..
10.……
11. ……
12.}

The above program will work fine for both the conditions, which means
that if the condition is accurate, and then else should be false and
conversely.

Testing based on the memory (size) perspective


The size of the code is increasing for the following reasons:

o The reuse of code is not there: let us take one example, where we
have four programs of the same application, and the first ten lines of the
program are similar. We can write these ten lines as a discrete function,
and it should be accessible by the above four programs as well. And also,
if any bug is there, we can modify the line of code in the function rather
than the entire code.
o The developers use the logic that might be modified. If one
programmer writes code and the file size is up to 250kb, then another
programmer could write a similar code using the different logic, and the
file size is up to 100kb.
o The developer declares so many functions and variables that might
never be used in any portion of the code. Therefore, the size of the
program will increase.

For example,

1. Int a=15;
2. Int b=20;
3. String S= "Welcome";
4. ….
5. …..
6. …..
7. ….
8. …..
9. Int p=b;
10.Create user()
11. {
12.……
13. ……
14.….. 200's line of code
15. }
Test the performance (Speed, response time) of the
program
The application could be slow for the following reasons:

o When logic is used.


o For the conditional cases, we will use or & and adequately.
o Switch case, which means we cannot use nested if, instead of using a
switch case.
As we know that the developer is performing white box testing, they
understand that the code is running slow, or the performance of the
program is also getting deliberate. And the developer cannot go manually
over the program and verify which line of the code is slowing the program.

To recover with this condition, we have a tool called Rational Quantify,


which resolves these kinds of issues automatically. Once the entire code is
ready, the rational quantify tool will go through the code and execute it.
And we can see the outcome in the result sheet in the form of thick and
thin lines.

Reasons for white box testing


o It identifies internal security holes.
o To check the way of input inside the code.
o Check the functionality of conditional loops.
o To test function, object, and statement at an individual level.

Advantages of White box testing


o White box testing optimizes code so hidden errors can be identified.
o Test cases of white box testing can be easily automated.
o This testing is more thorough than other testing approaches as it
covers all code paths.
o It can be started in the SDLC phase even without GUI.

Disadvantages of White box testing


o White box testing is too much time consuming when it comes to
large-scale programming applications.
o White box testing is much expensive and complex.
o It can lead to production error because it is not detailed by the
developers.
o White box testing needs professional programmers who have a
detailed knowledge and understanding of programming language
and implementation.

Techniques Used in White Box Testing


Data Flow Testing:
Data flow testing is a group of testing strategies that examines the control flow
of programs in order to explore the sequence of variables according to the
sequence of events.

Control Flow Testing:


Control flow testing determines the execution order of statements or instructions
of the program through a control structure. The control structure of a program is
used to develop a test case for the program. In this technique, a particular part
of a large program is selected by the tester to set the testing path. Test cases
represented by the control graph of the program.

Branch Testing:
Branch coverage technique is used to cover all branches of the control flow
graph. It covers all the possible outcomes (true and false) of each condition of
decision point at least once.

Statement Testing:
Statement coverage technique is used to design white box test cases. This
technique involves execution of all statements of the source code at least once.
It is used to calculate the total number of executed statements in the source
code, out of total statements present in the source code.

Decision Testing:
This technique reports true and false outcomes of Boolean expressions.
Whenever there is a possibility of two or more outcomes from the statements like
do while statement, if statement and case statement (Control flow statements),
it is considered as decision point because there are two outcomes either true or
false.

Black box testing


 Black box testing is a technique of software testing which examines
the functionality of software without peering into its internal
structure or coding.

 The primary source of black box testing is a specification of


requirements that is stated by the customer.

Generic steps of black box testing


o The black box test is based on the specification of requirements, so
it is examined in the beginning.
o In the second step, the tester creates a positive test scenario and an
adverse test scenario by selecting valid and invalid input values to
check that the software is processing them correctly or incorrectly.
o In the third step, the tester develops various test cases such as
decision table, all pairs test, equivalent division, error estimation,
cause-effect graph, etc.
o The fourth phase includes the execution of all test cases.
o In the fifth step, the tester compares the expected output against
the actual output.
o In the sixth and final step, if there is any flaw in the software, then it
is cured and tested again.

Test procedure
The test procedure of black box testing is a kind of process in which the
tester has specific knowledge about the software's work, and it develops
test cases to check the accuracy of the software's functionality.

It does not require programming knowledge of the software. All test cases
are designed by considering the input and output of a particular function.A
tester knows about the definite output of a particular input, but not about
how the result is arising. There are various techniques used in black box
testing for testing like decision table technique, boundary value analysis
technique, state transition, All-pair testing, cause-effect graph technique,
equivalence partitioning technique, error guessing technique, use case
technique and user story technique. All these techniques have been
explained in detail within the tutorial.

Test cases
Test cases are created considering the specification of the requirements.
These test cases are generally created from working descriptions of the
software including requirements, design parameters, and other
specifications. For the testing, the test designer selects both positive test
scenario by taking valid input values and adverse test scenario by taking
invalid input values to determine the correct output. Test cases are mainly
designed for functional testing but can also be used for non-functional
testing. Test cases are designed by the testing team, there is not any
involvement of the development team of software.

You might also like