Closed jiseongg closed 3 years ago
For assertion generation check the abstract class org.evosuite.assertion.AssertionGenerator
in the client module; the default version used is the SimpleMutationAssertionGenerator
. If you want to disable assertion generation the commandline option is -Dassertions=false
.
However, note that assertion generation is not what adds try/catch blocks: EvoSuite does not know the intended behaviour of the class under test, so it captures exactly what it is doing right now, and that includes exceptions.
You can configure EvoSuite not to add catch blocks for undeclared exceptions using -Dcatch_undeclared_exceptions=false
, maybe that is what you need?
Thank you for detailed answer. I think it will be of great help :)
I've read the EVOSUITE tutorial, and found that inserting JUnit Assertion is done by the post-processing part. This is one I want to disable for research purpose, and need some advice where to start hack. Also, if it's simple, I want to disable the EVOSUITE's expectation about some error, which seems to wrap code with try-catch block.
Thanks in advance for any help you are able to provide.