Thanks. I have a idea on the search method. Actually, my problem is I have
no idea how to feed the input data to c program,(using ruby inline?)and output
the coverage(I try to add some c code into the c program to get the statement
coverage)to the ruby, some suggest me to use command line to input the data to
c program,but there is a problem
like that :
system “./triangle” #call c program
foo xxxxx
program will excute the c c program first, and after it terminate, then will
excute the next line in ruby.
===== Original Message From “Bill Kelly” billk@cts.com =====
Hi,
My problem is generate a set of test cases automatically in Ruby, and use
it to test the c program get the statement coverage which should be pass to
ruby, the ruby program supposed to use a search method to generate the
better test cases to test the c program again untill find the best test
cases which can fullly cover all of the statements… That means the input
of
c program should be generated from ruby and the result of statement
coverage
···
should be passed to ruby.
Perhaps you could post some sample “test” data to be fed to the ‘C’
program, and an example of what the output data from the coverage
analyzer looks like. (?)Do you already have an idea what kind of search method you plan to
use to cause the output from the coverage analysis to be useful
in adapting the generated input data toward increased coverage?It sounds like a difficult problem in any language.
Seems I should use rubyinline. Is there any one has suggestion about it? Or
any other way to do it?
Thanks.Regards,
Bill