-
Couldn't load subscription status.
- Fork 45
Python and JS support #1197 #1199
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Conflicts: # utbot-framework/src/main/kotlin/org/utbot/framework/codegen/model/constructor/tree/CgMethodConstructor.kt # utbot-intellij/build.gradle.kts # utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/ui/actions/GenerateTestsAction.kt
…R' into tamarinvs19/UnitTestBot_Family_PR
…R' into tamarinvs19/UnitTestBot_Family_PR
Damtev
approved these changes
Nov 1, 2022
# Conflicts: # utbot-framework/src/main/kotlin/org/utbot/framework/codegen/model/CodeGenerator.kt # utbot-framework/src/main/kotlin/org/utbot/framework/codegen/model/constructor/tree/CgTestClassConstructor.kt # utbot-framework/src/main/kotlin/org/utbot/framework/codegen/model/visitor/CgAbstractRenderer.kt
# Conflicts: # utbot-framework/src/main/kotlin/org/utbot/framework/codegen/model/constructor/tree/CgTestClassConstructor.kt # utbot-framework/src/main/kotlin/org/utbot/framework/codegen/model/visitor/CgAbstractRenderer.kt # utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/generator/CodeGenerationController.kt
…R' into tamarinvs19/UnitTestBot_Family_PR # Conflicts: # utbot-js/src/main/kotlin/service/BasicCoverageService.kt
# Conflicts: # utbot-ui-commons/src/main/kotlin/org/utbot/intellij/plugin/ui/components/TestFolderComboWithBrowseButton.kt
This was referenced Nov 9, 2022
CaelmBleidd
added a commit
that referenced
this pull request
Nov 10, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
We added Python and JavaScript tests generation.
UI
To expand UtBot UI functionality we added next new modules:
utbot-ui-commonmodule:utbot-intellijto avoid cyclic dependencies in project buildingLanguageAssistantaccess to dynamically connect API from language dependent modules. Now exists Python, JS and JVM assistants.BaseTestModel- parent class forPythonTestModel,JsTestModelandGenerateTestModel. This class was created becauseGenerateTestModeluse JVM specific functionsutbot-intellij-python,utbot-intellij-jsmodules:These modules contain language-specific implementations of
LanguageAssistans,BaseTestModel,DialogWindowand other classes.Code generation
Previous solution of the problem with different logic for different languages (Java and Kotlin) in code generation which used
CodegenLanguageshould not be used with new languages.Our solution suggest to use abstract class
CgLanguageAssistantwhich contains information about code generation language (e.g.languageKeywords, getters forCgNameGenerator,CgMethodConstructor...). In language-specific modules we can create implementations with language-specific logic.We did not delete
CodegenLanguage.JAVAandCodegenLanguage.Kotln, but it is possible if our solution will be approved.Base implementation for
JavaandKotlinwe have already added inorg.utbot.framework.plugin.api.Analogically we added
LanguageTestFrameworkManagerto organize test framework logic for different languages.CLI
Modules
utbot-cli-pythonandutbot-cli-jscontain command line generation and run tests interface for Python and JavaScript. They depends onutbot-climodule.Main language modules:
Modules
utbot-pythonandutbot-jscan be used from IntelliJ-plugin and from CLI. They contain independent of PSI logic, for example, languageUtModels, fuzzing and code generation declarated there.Fixes #1197
Type of Change
Please delete options that are not relevant.
How Has This Been Tested?
Automated Testing
We have code examples for testing how UtBot works:
utbot-python/samples/There are script
generate_test_samples.shfor automatic run generation test from cli andrun_test_samples.shfor run generated tests.utbot-js/samples/Manual Scenario
Checklist (remove irrelevant options):