Professional Documents
Culture Documents
Introduction
Page
1
information as available in those successful test cases goes unused which
could otherwise be of great advantage. A Metamorphic Testing method has
been proposed by Chen et al. [1] to employ successful test cases and better
the oracle problem. This method has been proposed to test programs without
the involvement of an oracle. It employs properties of target function known as
metamorphic relations to generate follow up test cases and verify the outputs
automatically. Such relations are expected relations between the inputs and
outputs of the multiple target program execution.
Page
2
Chapter 2
Objectives
3. Verification of results.
Page
3
Chapter 3
Metamorphic Testing
It also laments that even if original test case does not provide us any failure it
has some information hidden there in it or we can say that we can generate
follow up test cases from it to verify the some important relations of the target
function in our software. These relations are called Metamorphic Relations.
Suppose we have
• Program-P
• Domain input-D
Page
4
• Test case selection strategy-S
Page
5
3.3 Application areas of Metamorphic Testing
• Online service oriented applications are also tested with the help of
metamorphic testing. It makes use of set of successful test cases
generated by offline testing to construct their corresponding follow up
test cases for online testing. These test cases are executed by
metamorphic services that encapsulates the services under test as well
as the implementation of metamorphic relations
Page
6
necessary to have an effective testing technique to address this
problem.
Page
7
‘Metamorphic relation is any relation among the inputs and the
outcomes of multiple executions of the target program’
MR’s are not confined to identity relations only. Any expected relation
containing inputs and outputs of two or more executions of the program can be
picked as MR.
All metamorphic relations are not useful to us and selection of good MR’s is a
difficult task. Useful Metamorphic relations are those which can make multiple
executions of a program as different as possible. Importance of structure of the
program under test should be main part for selection strategy to emphasize
on. It is mandatory to understand the algorithm so as to select good
metamorphic relations. The reason being the algorithms are easier to
understand then source code.
Page
8
• Equalities of Linear Combinations- If the metamorphic relation is an
equation with linear combinations on each side (with at least two terms
on one side), there is vulnerability against erroneous multiplications.
gcd(a,b).gcd(c,d)=gcd(ac,bd)
• At the very first instance testers make an identification and also make
MR’s ie MR1, MR2..MRn. It is done from the target function f. For this
purpose testers construct a function generate so that follow up test
cases may be generated from the initial test case.
• Next step involves constructing of the function ‘veri’ for each MRi, so
that it can be verified that weather multiple inputs and the
corresponding outputs satisfy MRi.
• The final stage, the test drivers takes the course of function ‘geni’ for
every test case T so as to generate follow up test cases and thus
applying the function veri so as to test the satisfaction criteria about the
metamorphic relation MRi. In case a Metamorphic Relation MRi is not
followed by any test case ‘veri’ reports that an error is detected in the
software considered under test.
Page
9
Chapter 4
Literature Survey
To verify the correctness of the program in those situations where the oracle is
not available, Metamorphic Testing serves as a useful technique. It takes the
channel of successful test cases and yielding the follow up test cases along
with the metamorphic relations.
Chen et al. [1] took the use of metamorphic testing to solve the partial
differential equations to different programs. This results into removing the
oracle problem while testing numerical component. From it the effectiveness of
metamorphic testing, by testing of a program that solves an elliptic partial
differential equation with boundary conditions, is well demonstrated. It is also
useful to find out the subtle errors of the kind which may not come forth by
taking special test cases.
Furthermore, Chen and colleagues [2] brought forward a semi proving method
which is capable of verifying expected necessary conditions in regard to the
correctness of the program. Symbolic evaluation and MT techniques are
integrated to envisage this method. Both structural (white box) information
when performing global symbolic evaluation and functional (black box)
information of the problem domain are taken course of when metamorphic
relations are to be identified. This combination of black and white box
information helps in better tackling of subtle errors in white box testing such as
missing path has. From the viewpoint of testing this integration helps to
mitigate the problem that software testing does not assure the absence of
faults. Target properties can be verified by using appropriate sets of inputs
which are identified through MR. From the viewpoint of program proving it also
presents the procedure to prove selected pertinent conditions of program
correctness and it also helps in identification of failure causing inputs if there
are any.
Page
10
An overview of the basic concepts of metamorphic testing, some interesting
extensions in the domains of program testing, proving and debugging is
provided by Chen et al. [3]. Even in the absence of oracle the metamorphic
relations can be tested. A many other critical issues about fault detection
effectiveness of metamorphic testing are highlighted. By giving the symbolic
inputs for the verification of the program, metamorphic testing serves as a
supportive semi proving method. Besides program verification semi proving
technique works as a support in debugging by generating limit expressions in
regard to those inputs which cause failure.
(a) theoretical knowledge of the problem domain is not sufficient for making
a distinction of good MR’s, and
(b) We consider those Mr’s good those can help in the multiple undertaking of
the program as varied as possible. MR selection strategy stresses upon the
pertinence of the structure of the program under consideration. Nevertheless it
is not important for the testers to wholly understand the program code before
putting it to test. Algorithm that the program follows should be the main key
area to decide good MR’s because algorithms are easier to understand then
the source code It is important to mention here that
Page
11
It has been further demonstrated by the Author [5] that the use of
metamorphic testing is a compliment to special value testing. It can bring out
faults where special value testing finds itself incapable to do so. Examples
presented in this paper lack test oracles so the route of special value testing is
taken. Special value testing has a short coming that by its use one cannot
determine its reliability. Metamorphic testing does away with this issue
through testing of metamorphic relationships and enhances the number of test
cases with the help of random test values in its set of test data.
Page
12
conducting metamorphic testing. It contain services under test along side the
implementation of metamorphic relations. This approach involves making the
use of a successful test case for offline testing as if they are the original test
case for online testing.
Page
13
Sami Beydeda[13] demonstrated an approach to improve the program with
self-testability. It will decrease the amount of information which is to be
thoroughly tested be human tester and it can also simplify the testing process.
An approach to self-testability in which test case generation and test
evaluation is there is presented in this paper. This approach proposed is an
integration of self-testing COTS components (STECC) method and metamorphic
testing approach.
Another approach is proposed by Murphy et al. [16] for testing software in the
absence of test oracles that uses metamorphic testing, run time assertion
checking and the JML specification language in conjunction. Metamorphic
properties are satisfied by JML (a behavioural interface language). For doing so
an implementation framework comes handy to convert the specification of
metamorphic properties into test methods. It can be then executed by making
the use of assertion checking. Furthermore it can also be made use of the
testing of applications for which a test oracle is present for creating new test
Page
14
cases (based on previous test cases) for regression testing and program
evolution in the coming future.
Page
15
Chapter 5
Proposed Framework
Page
16
References
[1] T.Y. Chen, J. Feng and T.H. Tse, “Metamorphic testing of programs on
partial differential equations: a case study”. In Proceedings of the 26th Annual
International Computer Software and Applications Conference (COMPSAC
2002), IEEE Computer Society Press, pp.327-333, 2002.
[2] T.Y. Chen, T.H. Tse and Z.Q. Zhou, “Semi-proving: An Integrated Method
Based on Global Symbolic Evaluation and Metamorphic Testing”. In
Proceedings of the ACM SIGSOFT International Symposium on Software Testing
and Analysis (ISSTA 2002) ACM Press, New York, pp. 191-195, 2002.
[3] T. Y. Chen, F.-C. Kuo, T. H. Tse and Z. Q. Zhou,“ Metamorphic Testing and
Beyond”. In Proceedings of the Eleventh Annual International Workshop on
Software Technology and Engineering Practice (STEP’04) , IEEE Computer
Society Press, pp. 94–100, 2004.
[4] T. Y. Chen, D.H. Huang, T. H. Tse and Z. Q. Zhou, “Case study on the
selection of useful relations in metamorphic testing”. In Proceedings of the 4th
Ibero-American Syposium on Software Engineering and Knowledge
Engineering(JIsic 2004), Polytechnic University of Madrid, Spain , pp.569-583,
2004.
[5] T. Y. Chen, F.-C. Kuo., Y. Liu, and A. Tang, “Metamorphic testing and
testing with special values”. In Proceedings of the Fifth International
Conference on Software Engineering, Artificial Intelligence, Networking, and
Parallel /Distributed Computing (SNPD 2004), International Association for
Computer and Information Science, Mt. Pleasant, Michigan, 2004.
[6] W.K. Chan, T.Y. Chen, H. Lu, T.H. Tse and S.S. Yau, “A Metamorphic
Approach to Integration Testing of Context-Sensitive Middleware-Based
Applications”. In Proceedings of the 5th Annual International Conference on
Page
17
Quality Software (QSIC 2005), IEEE Computer Society, Los Alamitos, California,
pp.470-476, 2005.
[12] Johannes Mayer, Ralph Guderlei, “An Empirical Study on the Selection of
Good Metamorphic Relations”. In Proceedings of the 30 th Annual International
Computer Software and Application Conference (COMPSAC’06), IEEE Computer
Society Press, pp.475-484, 2006.
Page
18
[14] R.Guderlei and J.Mayer, “Statistical metamorphic testing- testing
programs with random output by means of statistical hypothesis tests and
metamorphic testing.” In Proceeding of the Seventh International Conference
on Quality Software (QSIC’07), IEEE Computer Society Press, pp. 404-409,
2007.
[15] C.Murphy, G. Kaiser, L. Hu and L. Wu., “Properties of Machine Learning
Applications for Use in Metamorphic Testing”. In Proceeding of the 20th
International Conference on Software Engineering and Knowledge Engineering
(SEKE), pp. 867–872, 2008.
[16] C.Murphy, K. Shen, and G. Kaiser, “Using JML Runtime Assertion Checking
to Automate Metamorphic Testing in Applications Without Test Oracles”. In
Proceeding of the Second IEEE International Conference on Software Testing,
Verification and Validation(ICST), pp.436-445, 2009.
Page
19