1
votes

I am looking for a Test suite optimization using a Genetic Algorithm(GA). There are multiple IEEE research papers suggesting this, but I need help on implementing the same (using python).

These are my GA steps:

  1. Representation: How to represent test case features in GA?
  2. Initialize and evaluate (Fitness Function): How to create a Fitness function - formula?
  3. Parent selection, Crossover and Mutation: Running though the GA
  4. Output: Inferring from the output

I've done a lot of research on this, but I could not get on to the phase where I can implement.

For test case optimization (selecting the best test case) I use GA python packages.
Any help is much appreciated.

1
"could not get on how to implement" - what did you try? what is the difficulty? - yakobom

1 Answers

0
votes

that's what I've been looking for as well.

Representation is a fist issue, but we can give ids for each step in the test case.

The fitness function could be a grade of how much that step covers, and the time spent to execute it.

Selection can be random, or we can specify pre/post step to use in a test case (Each step can have a pre/post step).

Then, we can generate lots of test cases containing steps. And get the best ones in each generation based on that FF.

Still working on some coding. We should be in contact.