Assignment: Static and Dynamic Analysis

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

ASSIGNMENT

STATIC AND DYNAMIC ANALYSIS:

Static Testing is a white box testing technique where the developers verify or test their code with the help of checklist to
find errors in it. This type of testing is done without running the actually developed application or program. Code reviews,
inspections, walkthroughs are mostly done in this stage of testing. Static testing warns about:

 syntax errors
 code that will be hard to maintain
 code that will be hard to test
 code that does not conform to coding standards
 non-portable usage
 ANSI violations

Dynamic Testing is done by executing the actual application with valid inputs to check the expected output. It finds bugs
only in parts of the code that are actually executed. Examples of Dynamic Testing methodologies are Unit Testing,
Integration Testing, System Testing and Acceptance Testing.

Some differences between Static Testing and Dynamic Testing are,

 Static Testing is more cost effective than Dynamic Testing because Static Testing is done in the initial stage.
 In terms of Statement Coverage, the Static Testing covers more areas than Dynamic Testing in shorter time.
 Static Testing is done before the code deployment where the Dynamic Testing is done after the code
deployment.
 Static Testing is done in the Verification stage where the Dynamic Testing is done in the Validation stage.
 Dynamic Testing detects fewer errors than Static Testing, but it does detect some that Static Testing misses.

References:

 http://softwaretestingguide.blogspot.com/
 http://docs.google.com/viewer?
a=v&q=cache:Gh2GghiINc4J:www.angelfire.com/nt2/softwarequality/testestxdin.pdf+&hl=en&pid=bl&srcid=ADGEESi
2EATgTtDBVuK0ZZ0ztmBuNyOWc5MR4hQyLPZu6fL26yVqwdlzUfHWZiyTLLuXzVP6l869gIRUdkWxhNH7oW7bym-
lXCDlRDB4JzzMZkpxTBrZEc5WYzrusW87fAUl6bW_uFyT&sig=AHIEtbS3rjUqecDLrj_lqPhlCDuY0VgRRA

SYMBOLIC EVALUATION:

Symbolic evaluation is useful for several different kinds of program analysis. It can be used to automate test data
generation, to assist in the proof of correctness of programs and program paths and to carry out symbolic program
testing. Symbolic testing is reliable for an error occurring in some path if the symbolic output for the path reveals the
presence of the error. In order to be reliable, symbolic testing must not only reveal errors but must reveal them in a
way that will, in some ill defined sense, catch the attention of the programmer. Symbolic evaluation can be used to
automate the generation of test data in different ways.

References:

 http://cseweb.ucsd.edu/~howden/MyPapers/Effectiveness%20of%20SEval.pdf

MUTATION ANALYSIS:
Mutation Analysis is a method of software testing, which involves modifying programs' source code in small ways. It is

used for determining if a set of test data or test cases is useful, by purposely introducing various code changes or bugs and

retesting with the original test data or cases to determine whether the 'bugs' are detected. Mutation testing is done by

selecting a set of mutation operators and then applying them to the source program one at a time for each applicable

piece of the source code. The result of applying one mutation operator to the program is called a mutant. If the test suite is

able to detect the change (i.e. one of the tests fails), then the mutant is said to be killed. For example, in the following code

fragment:

if (a && b)
c = 1;
else
c = 0;

The condition mutation operator would replace '&&' with '||' and produce the following mutant:

if (a || b)
c = 1;
else
c = 0;

Now, for the test to kill this mutant, the following condition should be met:

 Test input data should cause different program states for the mutant and the original program. For example, a

test with a=1 and b=0 would do this.

 The value of 'c' should be propagated to the program's output and checked by the test.

Weak mutation testing (or weak mutation coverage) requires that only the first condition is satisfied. Strong mutation

testing requires that both conditions are satisfied. Strong mutation is more powerful, since it ensures that the test suite can

really catch the problems. Weak mutation is closely related to code coverage methods. It requires much less computing

power to ensure that the test suite satisfies weak mutation testing than strong mutation testing.

References:

 http://softwaretestingguide.blogspot.com/
 http://en.wikipedia.org/wiki/Mutation_testing

FORMAL VERIFICATION:

Formal verification is a systematic process that uses mathematical reasoning to verify that design intent is preserved in
implementation. Formal verification algorithmically and exhaustively explores all possible input values over time. It is the
use of mathematical techniques to ensure that a design conforms to some precisely expressed notion of functional
correctness. Concretely, assume that there is a model of a design, some description of the environment that the design is
supposed to operate in, and some properties that the design is intended to fulfil. Given this information, it might be
required to search for some input patterns that the environment could generate that will violate the properties. Classical
approaches to demonstrating that such input stimuli exist are random simulation, or directed test. Formal verification is an
alternative approach that can be used both to search for inputs sequences that violate the properties, and prove that the
properties always hold in the case when no such stimuli exist.

References:
 http://www.eetasia.com/STATIC/PDF/201005/EEOL_2010MAY21_EDA_TA_01.pdf?SOURCES=DOWNLOAD
 http://portal.acm.org/citation.cfm?id=1113794

You might also like