Testing Strategies Ooad
Testing Strategies Ooad
Black Box Testing is testing without knowledge of the internal workings of the item being tested. For
example, when black box testing is applied to software engineering, the tester would only know the
"legal" inputs and what the expected outputs should be, but not how the program actually arrives at
those outputs. It is because of this that black box testing can be considered testing with respect to the
specifications, no other knowledge of the program is necessary. For this reason, the tester and the
programmer can be independent of one another, avoiding programmer bias toward his own work. For
this testing, test groups are often used, "Test groups are sometimes called professional idiots...people
who are good at designing incorrect data." 1 Also, do to the nature of black box testing, the test
planning can begin as soon as the specifications are written. The opposite of this would be glass box
testing, where test data are derived from direct examination of the code to be tested. For glass box
testing, the test cases cannot be determined until the code has actually been written. Both of these
testing techniques have advantages and disadvantages, but when combined, they help to ensure
thorough testing of the product.
Unit Testing: The developer carries out unit testing in order to check if the particular module or unit of
code is working fine. The Unit Testing comes at the very basic level as it is carried out as and when the
unit of the code is developed or a particular functionality is built.
Static and dynamic Analysis: Static analysis involves going through the code in order to find out any
possible defect in the code. Dynamic analysis involves executing the code and analyzing the output.
Statement Coverage: In this type of testing the code is executed in such a manner that every statement
of the application is executed at least once. It helps in assuring that all the statements execute without
any side effect.
Branch Coverage: No software application can be written in a continuous mode of coding, at some point
we need to branch out the code in order to perform a particular functionality. Branch coverage testing
helps in validating of all the branches in the code and making sure that no branching leads to abnormal
behavior of the application.
Security Testing: Security Testing is carried out in order to find out how well the system can protect
itself from unauthorized access, hacking – cracking, any code damage etc. which deals with the code of
application. This type of testing needs sophisticated testing techniques.
Mutation Testing: A kind of testing in which, the application is tested for the code that was modified
after fixing a particular bug/defect. It also helps in finding out which code and which strategy of coding
can help in developing the functionality effectively.
Besides all the testing types given above, there are some more types which fall under both Black box
and White box testing strategies such as: Functional testing (which deals with the code in order to check
its functional performance), Incremental integration testing (which deals with the testing of newly
added code in the application), Performance and Load testing (which helps in finding out how the
particular code manages resources and give performance etc.) etc.
Top-Down Testing
Top-down software testing is an incremental unit testing method which beginsby testing the top level
module, and progressively adds in lower levelmodules, one at a time.The idea is simple. Begin with the
highest-level module, using stubs tostand in for any module it invokes. For the next test, add in any
modulewhich satisfies the following rule:THE GOLDEN RULE OF TOP-DOWN SOFTWARE TESTINGIn order
to test a unit, you must first have tested at least one modulewhich calls it. (Exception: the top-level unit,
which is not called by anymodule.)
Bottom-up testing:
Bottom-up testing starts with the details of the system and proceeds to a higher levels by a progressive
aggregation of details until they collectively fit the requirements of the system.this approach is more
approprite for testing the individual objects in the system. in Bottom-Up testing yoou start with the
methods and classes that call or rely on no others.you test them thoroughly.then you progree to the
next level up:those methods and classes that use only the bottom level ones already tested.next you
test combinations of the bottom two layers.proceed until you are testing the entire program.this
strategy makes sense because the behavior of the code is shecked before it is used by another.
Advantages of using a bottom-up approach
to software testing is the fact that there is no need for stubsor drivers and errors in critical modules are
found earlier.