Subscribe by Email


Tuesday, August 3, 2010

Static and Dynamic Analysis in Testing and their differences.

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.

- Static testing is about prevention.
- In static testing, the software is not actually used.
- 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.
- This testing is used by the developer who writes the code in isolation.
- Out of Verification and Validation, it is the verification portion.
- Static testing methodologies include code reviews, inspection and walkthroughs.
- Dynamic testing is about cure.
- The source code is actually compiled and run.
- It examines the physical response from the system.
- Out of Verification and Validation, it is the validation portion.
- Dynamic testing methodologies include unit testing, integration testing, system testing and acceptance testing.
- Static testing is many times more cost-effective than dynamic testing.
- Static testing achieves 100 statement coverage in a relatively short time while dynamic testing often often achieves less than 50 statement coverage.
- Static testing can be done before compilation while dynamic testing can take place only after compilation and linking.
- Static check is more profitable than the dynamics of the static check because tests are made at the initial stage.

Why is static testing more effective?
Static testing gives you comprehensive diagnostics for your code. It warns you about:
- syntax errors.
- code that will be hard to maintain.
- code that will be hard to test.
- code that does not conform to your coding standards.
- non-portable usage.
- ANSI violations.


No comments:

Facebook activity