UnitTestBot / UTBotJava

Automated unit test generation and precise code analysis for Java
Apache License 2.0
133 stars 38 forks source link

Prioritize Symbolic Engine executions #843

Open sofurihafe opened 1 year ago

sofurihafe commented 1 year ago

Description

Sometimes we need to turn off Symbolic Engine and stop the test generation (and do not collect this execution) in case of mocking taking place when generating parameterized tests. However, Fuzzer can still add its executions which may lead to unwanted executions being processed later. The suggestion is to prioritize Symbolic Engine executions in minimization process.

Details

Run parameterized test generation for vertexSum method from Recursion test set in plugin. Currently, generated test will fail. With #845 changes applied it will lead to empty test class because we cut off all Fuzzer executions for the reason described above.

dtim commented 1 year ago

It seems that this issue requires further discussion. Minimization algorithm can't guarantee that no "bad" (for the parametrized test generator) fuzzed executions are added. The only way to completely guarantee it is to exclude all fuzzed executions, but it will drop coverage, and anyway this can be done at the execution generation phase, so there is no need to modify the minimizer.

There are several distinct problems indeed.

CaelmBleidd commented 1 year ago

@EgorkaKulikov @sofurihafe do we need to fix this issue? We discussed it with @sergeypospelov and @dtim, looks like minimization should not know anything about fuzzer and symbolic execution, therefore, it is better to close this task