Difference between Static and Dynamic Testing

Key Difference: Static testing is testing that happens even before the written code of the software is executed.  Dynamic testing happens in a run-time environment, which means that the code is executed with security analysis to see how it runs.

Static testing and dynamic testing are two common types of testing that one comes across as a software developer. These are the most crucial tools that are available to him in order to secure the software development lifecycle. A developer must use both the tools in order to determine if the software developed is ready for release on the market.

Static testing is testing that happens even before the written code of the software is executed. The developer gets the opportunity to go through the coding with a fine toothed comb to see if there are any errors. It also allows them to see if the codes comply with the local laws. Static testing revels flaws and provides the developer to correct them before the execution happens. In some instances, the developer can also identify any malicious code that can cause issues during the execution. Static testing is often referred to as verification: the evaluation of the development process.

Dynamic testing happens in a run-time environment, which means that the code is executed with security analysis to see how it runs. This allows the developer to determine if the software is running and also identify if produces the same results as the developer expected. This allows developers to analyse the functional behaviour of a piece of software, and monitor its interaction with system memory, CPU function and overall system performance. Dynamic testing is often referred to as validation: the evaluation of a finished product.

Comparison between Static and Dynamic Testing:

 

Static Testing

Dynamic Testing

Execution

Happens without the execution of the code

Involves execution of the code

Examination

Examined manually or some static analysis tool is used

Examined by giving a set of inputs so see if the output matches the expected results

Time

Testing happens early on before the development of the product has even begun

Happens after the product has been developed

Types of Defects

Missing requirements, Design defect, Syntax Error, etc.

Variables not constant, checking if output matches the expected values

Testing Techniques

Informal Reviews, Technical Reviews, Walkthrough, Inspection, Static code Review

Unit Testing, Integration Testing, System Testing

Compilation

Find bugs before compilation

Find bugs after compilation

Type

Prevention

Cure

Cost

Is more cost effective

Is comparatively more expensive

Stage

Done in the verification stage

Done in the validation stage

Time

Is less time consuming

Is more time consuming

Image Courtesy: qcboss.wordpress.com, guru99.com

Top 10 Most Searched Differences Most Searched Non-Alcoholic Drinks
Most Searched in Health Most Searched in Environment
Courier vs Cargo
Wikipedia vs Encyclopedia
Hurricane vs Blizzard
Thorns vs Spines vs Prickles

Add new comment

Plain text

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.