Tuesday, April 26, 2011

Static and Dynamic Testing



Static Testing: The Static testing refers to testing that is not running. It is analyzing and reviewing it. The specification is a document and not an executing program, so it’s considered as static. It’s also something that was created using written or graphical documents or a combination of both.


or


The Verification activities fall into the category of Static Testing. During static testing, you have a checklist to check whether the work you are doing is going as per the set standards of the organization. These standards can be for Coding, Integrating and Deployment. Review's, Inspection's and Walkthrough's are static testing methodologies.


High-level Reviews of specification


·                  Pretend to be the customer.
·                  Research existing Standards and Guidelines.
·                  Review and Test similar software.

Low-level Reviews of specification

·                  Specification Attributes checklist.
·                  Specification terminology checklist.

These standards can be for Coding, Integrating and Deployment. Review's, Inspection's and Walkthrough's are static testing methodologies.


Dynamic Testing: Dynamic Testing involves working with the software, giving input values and checking if the output is as expected. These are the Validation activities. Unit Tests, Integration Tests, System Tests and Acceptance Tests are few of the Dynamic Testing methodologies. As we go further, let us understand the various Test Life Cycle's and get to know the Testing Terminologies. To understand more of software testing, various methodologies, tools and techniques, you can download the Software Testing Guide Book.
or
Dynamic Testing involves working with the software, giving input values and checking if the output is as expected. These are the Validation activities. Unit Tests, Integration Tests, System Tests and Acceptance Tests are few of the Dynamic Testing methodologies.



Dynamic Testing: Techniques used are determined by type of testing that must be conducted.

·        Structural (usually called “white box”) testing.
·        Functional (”black box”) testing.


Structural testing or White box testing

The Structural tests check the structure of the software itself and require full access to the source code. This is known as ‘white box’ testing because you are into the internal workings of the code. White Box tests make sure that the software structure itself contributes to proper and efficient program execution. Complicated loop structures, common data areas, 100,000 lines of spaghetti code and nests of ifs are evil. Well-designed control structures, sub-routines and reusable modular programs are good.

White Box testing strength is also its weakness. The code needs to be examined by highly skilled technicians. That means that tools and skills are highly specialized to the particular language and environment. Also, large or distributed system execution goes beyond one program, so a correct procedure might call another program that provides bad data. In large systems, it is the execution path as defined by the program calls, their input and output and the structure of common files that is important. This gets into a hybrid kind of testing that is often employed in intermediate or integration stages of testing.

Functional or Black Box Testing

Black Box (or Functional Testing) testing examines the behavior of software as witnesses by its outputs without reference to internal functions. Thus it is also called ‘black box’ testing. If the program consistently provides the desired features with acceptable performance, then specific source code features are irrelevant. It’s a pragmatic and down-to-earth assessment of software. Black Box (or Functional Testing) testing better addresses the modern programming paradigm. As object oriented programming, automatic code generation and code re-use becomes more prevalent, analysis of source code itself becomes less important and functional tests become more important. 

The Black box tests also better attack the quality target. Since only the people paying for an application can determine if it meets their needs, it is an advantage to create the quality criteria from this point of view from the beginning. Black box tests have a basis in the scientific method. Like the process of science, Black box tests must have a hypothesis (specifications), a defined method or procedure (test plan), reproducible components (test data), and a standard notation to record the results. One can re-run black box tests after a change to make sure the change only produced intended results with no inadvertent effects.

Difference between Dynamic White-Box Testing and Debugging:
The goal of dynamic white-box testing is to find bugs. The goal of debugging is to fix them.

Si.No
Static Testing
Dynamic Testing
1
Static testing is a form of software testing where the software isn’t actually used.
In dynamic testing the software must actually be compiled and run.
2
It is generally not detailed testing, but checks mainly for the sanity of the code, algorithm, or document. It is primarily syntax checking of the code or and manually reading of the code or document to find errors
Dynamic analysis refers to the examination of the physical response from the system to variables that are not constant and change with time
3
This type of testing can be used by the developer who wrote the code, in isolation. Code reviews, inspections and walkthroughs are also used.

Some of dynamic testing methodologies include unit testing, integration testing, system testing and acceptance testing.
4
This is the verification portion of Verification and Validation
Dynamic testing is the validation portion of Verification and Validation.

5
These are verification activites. Code Reviews, inspection and walkthroughs are few of the static testing methodologies.
These are the Validation activities. Unit Tests, Integration Tests, System Tests and Acceptance Tests are few of the Dynamic Testing methodologies.










No comments:

Post a Comment