In: Computer Science
There are different types of software testing techniques as described below. There is no uniform (standard) best software testing technique. Each has its own benefits.
-Black box testing: based on functional requirements.
-White box testing: ensure that all statements and conditions have been executed at least once
-Manual software testing is time consuming
-Regression testing: Software testing has to be repeated after every change
Explain the following testing techniques and justify the statement - "There is no uniform (standard) best software testing technique."
Please help with this question and explain in your own words to avoid plagiarism. Thanks.
Black box testing: Black box testing is a type of testing where only the functionalities are tested without testing the internal code flow or the structure. We can visualize it as a black box where code or the syntax of the program is inside the box and the tester cannot see what is inside the box. The things which are tested are - interface errors, errors in external accesses (database access), performance errors and initialization/termination errors. An example of black box testing can be when the tester opens up a webpage developed and checks whether the hyperlinks are taking the user to desired links, or whether different tabs are showing correct details or if the output of every keytsroke is as expected. Advantages of black box testing are - it is done from an end user's perspective (an end user does not care about how a specific functionality is achieved as long as it covers all the scenarios and the performance is acceptable) so it helps in exposing specification discrepencies, the tester need not be a technical consultant. Disadvantages include - only some parts of the software can be tested, it is difficult to execute it when specifications are not clear.
White box testing: White box testing is a type of testing where the internal structure and the coding steps/syntax of the software is tested. We can visualize it as a white or a transparent box and in a transparent box, the internal structure of the software is quite visible to the tester. The things which are tested are - internal security issues, the flow of the code, all the classes and functions, expected input/outputs, complexity and working of conditional statements (loops). A small example of white box testing is - testing the program which calculates the square root of a number. We know that the sqaure root of a number should be lesser than the number itself, so we run the loop from 1 and increment by 1 until we reach the number. In each step we check if the square of number is equal to the number whose root is to be calculated, if yes we store that number and print it when the loop terminates. So during white box testing, to optimize the runtime, what we can find is that we can break out of the loop as soon as we find the square instead of waiting for the loop to terminate. Another optimization can be that we can run the loop from 1 to (input number / 2) because root of any number cannot be larger than half of the number. Advantages include - code can be optimized, it can be easily automated and it is more thorough. Disadvantages are - it is complex and expensive, the tester should have technical knowledge and it is very time consuming.
Manual testing: Manual testing is a type of testing which is done manually without a testing tool. It is the most primitive type of testing which helps in finding many critical bugs in the software. It is also used to check whether automated testing can be used and if it is feasible. The tester needs no knowledge of the testing tools but it is a very effort and time consuming method. The main goal of manual testing is to ensure that the software is error free and to deliver a bug free product to the cutomer. Advantages include - any software can be tested manually and the tester does need not have the knowledge of any automated testing tool. Disadvantages are - it requires skilled labour which implies high cost, it may get repititive and redundant.
Regression testing: Regression testing is a type of testing which mainly ensures that a recent fix has not affected the existing functionalities of the software. It basically includes the execution of all the test cases to ensure that the existing features have not been affected. It is done when a need arises to change any part of code in the software. Advantages of regression testing include - the entire software is checked so any chances of facing an issue or a bug is eliminated. The only downsides are that it is very time consuming and can become repititive and boring for the testing consultants.
There is no best testing technique because testing is something which very much depends on what needs to be tested and how it needs to be tested. Also, it depends on various factors such as how much time is available for testing and how clear are the scenarios for testing. Different types of defects are targeted by different testing techniques. Based on software and the requirements, the testing technique is selected. Sometimes a combination ofdifferent testing techniques can prove to be a good way to test the software. Every testing technique is good in its own way and better than all other techniques used to find a certain kind of defect.
For example, to find the defects that are not supposed to be in the code, structure based testing is used
Specification based testing technique can find what parts of the specification is missing
And only experience based testing can find out things that are missing apart from code and specification.
Factors that influence the decision of selecting a testing technique include -
Time and budget of the project, risk assessment, type of system used, SDLC model used, requirement and scenario calrity, testing objectives and the tester's experience.