Data Mutation Program in java

A

AnetaKvel

Hi,
As part of my software testing course I need to submit a program that
generates automatic seed(data mutation) for the given input source
code(in java) and produce the mutation output(with number of dead and
alive mutants).is there any particular automated seed generating
program pattern that I could refer too. I searched online but there
are only tools that are available to generate and test the source
code. Please provide me the links to the URL and any pseudo code
suggestion.
sorry for multiposting.
Thank you in advance,
 
D

Daniel Dyer

Hi,
As part of my software testing course I need to submit a program that
generates automatic seed(data mutation) for the given input source
code(in java) and produce the mutation output(with number of dead and
alive mutants).is there any particular automated seed generating
program pattern that I could refer too. I searched online but there
are only tools that are available to generate and test the source
code. Please provide me the links to the URL and any pseudo code
suggestion.

I gather you are referring to "Mutation Testing". Now I know nothing
about that topic, but I just read about it on the web, so correct me if I
am wrong. My understanding is that you take one program and a suite of
tests for that program then generate a whole load of minor mutations of
the program in an attempt to find deficiencies in the test suite (i.e.
incorrect programs that pass the tests).

I'm not sure exactly what you mean by seed. I assume you don't mean the
seed for a random number generator. It's also not clear to me how you
would distinguish between a mutant that passes the tests because it is
functionally-equivalent mutation of the correct program and a buggy mutant
that passes the tests because the tests suck. But anyway...

Writing a program to mutate Java source doesn't sound like fun. Any naive
approach is going to generate invalid programs more often than not. This
is not my area of expertise but I guess you would have to parse the source
into an abstract syntax tree and mutate that. Is it sufficient to simply
re-order a few statements and adjust a few values, or do the mutations
need to be more elaborate?

There seems to be some overlap here with methods used for genetic
programming, so it might be worth looking at GP tools. However, because
of the problems with generating invalid programs, GP usually uses Lisp or
domain-specific languages that are easy to mutate. Languages like Java
and C++ are generally too much hassle.

Dan.
 
D

Daniel Dyer

....

Writing a program to mutate Java source doesn't sound like fun. Any
naive approach is going to generate invalid programs more often than
not. This is not my area of expertise but I guess you would have to
parse the source into an abstract syntax tree and mutate that. Is it
sufficient to simply re-order a few statements and adjust a few values,
or do the mutations need to be more elaborate?

We both should have tried Google. I found this pretty easily:

http://ise.gmu.edu/~ofut/mujava/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top