lundi 22 février 2016

Automatic Test Case Generation for C code

I'm actually testing some C code using Simulink in SIL (Software in the loop). I create a test case in Matlab language with a script, then this in turn execute the C code, associated with a Simulink Model, in SIL. Is there a tool for generating test cases automatically? It should analyse a function and generate an input vector, each value in this vector execute a different path for the function. So suppose we have the following function:

void myFunc(int a)
{   
 ...
 if (a == 1) printf("Hello World!");

 else printf("Bye Bye");
 ...
}

The tool should generate two test cases: the first will have a = 1, and the second a = 0 (or any other int).

Aucun commentaire:

Enregistrer un commentaire