-
Notifications
You must be signed in to change notification settings - Fork 46
Summaries for tests generated by fuzzer are generated in the summary module #597 #599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@Markoutte there is an open question how to pass information required to the Name generation outside the Fuzzer module. I used UtExecution for that (adding two fields with types from Fuzzing module), but faced with some issues
So I decided to keep something with types Any and fill these fields with specific types later in Java 4 style. I don't see huge objection not to follow this way in my humble opinion, probably we need to extend the UtExecution hierarchy and make two sub-classes of the parent abstract class at this moment but it could be done in the following PR (it's not the goal of this PR) |
I think we can do this trick like that: move the knowledge about data origin into the API or even another high-level module and unbind it from the fuzzer. I wouldn't move the knowledge about fuzzing (or any another possible way we generate names) to the summaries. But we can make a contract with a flex hierarchy of classes somewhere upper in module hierarchy (for example, one for those which have jimple body or which provide some internal knowledge about data origin). I think, maybe, it is good idea to have something like "summary-api" or a package in framework-api for summaries. It gives us a way to choose how to fill this data for that summary. No summaries at all if we don't fill any. Moreover it helps to merge the last 4 fields of UtExecution (createdBy, summary, testMethodName, displayName) into one object to pass further. What do you think? |
@Markoutte I'd like your proposal, and ready to try to implement this approach. But I have an alternative suggestion: I have some tickets related to javadoc generation and clusterization for fuzzing and want to progress with them in parallel. Could we merge this as it's implemented and start with depending tickets and in parallel start the discussion with team about changes in API? |
# Conflicts: # utbot-framework/src/main/kotlin/org/utbot/engine/UtBotSymbolicEngine.kt # utbot-framework/src/main/kotlin/org/utbot/framework/codegen/model/constructor/context/CgContext.kt # utbot-framework/src/main/kotlin/org/utbot/framework/codegen/model/constructor/tree/CgMethodConstructor.kt # utbot-framework/src/main/kotlin/org/utbot/framework/codegen/model/constructor/tree/CgTestClassConstructor.kt # utbot-framework/src/main/kotlin/org/utbot/framework/plugin/api/TestCaseGenerator.kt # utbot-framework/src/test/kotlin/org/utbot/examples/UtModelTestCaseChecker.kt
@Markoutte @denis-fokin please have a look, I've implemented the proposed hierarchy of classes and handle separately each case where Symbolic Execution and Fuzzed Execution have different flows. Also, I checked this manually, fuzzing and symbolic works well together |
utbot-framework-api/src/main/kotlin/org/utbot/framework/plugin/api/Api.kt
Show resolved
Hide resolved
...rk/src/main/kotlin/org/utbot/framework/codegen/model/constructor/tree/CgFieldStateManager.kt
Show resolved
Hide resolved
...rk/src/main/kotlin/org/utbot/framework/codegen/model/constructor/tree/CgMethodConstructor.kt
Outdated
Show resolved
Hide resolved
...rk/src/main/kotlin/org/utbot/framework/codegen/model/constructor/tree/CgMethodConstructor.kt
Outdated
Show resolved
Hide resolved
...rk/src/main/kotlin/org/utbot/framework/codegen/model/constructor/tree/CgMethodConstructor.kt
Outdated
Show resolved
Hide resolved
utbot-summary/src/main/kotlin/org/utbot/summary/Summarization.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fuzzing part and UtExecution looks good to me
@Damtev thanks for review, I solved the majority of the questions @EgorkaKulikov please have a look |
execution.testMethodName, | ||
execution.displayName | ||
) | ||
if (execution is UtSymbolicExecution) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: return if
…module #597 (#599) * Just moved some classes and shifted the stage of name generation for fuzzing tests * Made some refactoring * Fixed a bug * Changed signatures * Fixed merge issues * Add some fixes * Add some fixes * Add some fixes * Fixed some places * Fixed some places * Fixed some places * Fixed wildcard imports
Description
Fixes #597
Type of Change
How Has This Been Tested?
Automated Testing
TODO: add unit-tests for fuzzing tests and its names too
Checklist (remove irrelevant options):
This is the author self-check list