What Is Software Testing
What Is Software Testing
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.
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:
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.
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. …… }
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.
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.
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.
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:
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.
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.