Monday, October 18, 2010

How Genetic Algorithm can ease your User Test cases (UI Tests)

 Let consider a large application to develop; it is not possible to list the entire exhaustive combination of User Test Cases : You could have millions of possible ways of using your complex application, hence millions of User Test Cases to record and run within the automated Software Factory.

When dealing with large and complex scenarios, Genetic Algorithms are good to find a solution quickly, whereas calculating all possible ways would last more than decades even with the fastest computer.

Let us assume that the red biomorph fractal below is THE best User Test Case that you are looking for, because it covers 100% of the needs (hence you don't have to tests all possible combinations, where many of them would likely to do nearly the same thing), and would guarantee no software regressions over years.

Since you don't know yet the solution, you would try to identify programmatically for exemple 1000 random combinations (24 of them are represented as white biomorph fractals below).
By letting them evolve throw a reproduction process (with various factors such as mutations) during a large number of iterations, this would lead to find a solution within minutes.
This may be not the perfect one, but the closest to the sought solution.
  

"Genetic Algorithm Viewer 1.0", by Jean-Philippe Rennard, is the software above that can demo the principles, based on biomorph fractals : http://www.rennard.org/alife/french/gavintr.html.

This post only shows an example of what could be done; it is up to you to either implement or buy a software that will help you implementing ONLY relevant User Test Cases (hence the minimum required tests), and not a large number of combinations anymore.

Some other links on AI or GA :
http://dotnetkicks.com/csharp/How_to_Create_a_Neural_Network_and_Genetic_Algorithm_in_C_NET
http://www.codeguru.com/Cpp/misc/misc/article.php/c3795
http://www.codeguru.com/cpp/cpp/algorithms/general/article.php/c14825

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.