views:

284

answers:

2

I am doing my project in software testing. Genetic algorithm is the technique I want to use to generate automatic test data\test cases in MATLAB.

Please help me in doing my project successfully.

A: 

First I would recommend that you understand what you REALLY want to do. I know Genetic Algorithms and Genetic Programming have an exotic feel to them and they sound like they can do a lot, but there are real-world limitations.

If you want to use GA's to generate test cases for a program, then you must be able to quantitatively determine when you've successfully produced a test case that:

A. Represents a unique test case.

B. Correctly tests code.

C. Produces the expected results.

D. Results in a realistic use case.

Lirik
One measure of B, C, D would be just getting the most code coverage (obtained by a particular test case or a batch of test cases).So having the fitness criteria = the maximization of code coverage could be a pretty good starting point.
Eugen Constantin Dinca
@Eugen 1 UP! Code coverage sounds good to me too... now let's see if the OP is following up on his/her question tho.
Lirik
A: 

GAs are a good candidate for your problem if (and only if) you can implement a fitness function capable of evaluating how good a "test case" is.

Also, if in your particular scenario there is no difference between "good" and "bad" test cases but only between "test cases" and "non test cases" then you're probably better off with some other generation strategy!

JohnIdol