Title: Python and JS support #1197 by tamarinvs19 · Pull Request #1199 · UnitTestBot/UTBotJava · GitHub
Open Graph Title: Python and JS support #1197 by tamarinvs19 · Pull Request #1199 · UnitTestBot/UTBotJava
X Title: Python and JS support #1197 by tamarinvs19 · Pull Request #1199 · UnitTestBot/UTBotJava
Description: Description We added Python and JavaScript tests generation. UI To expand UtBot UI functionality we added next new modules: utbot-ui-common module: in this module we used no language-specific IntelliJ SDK API this gradle module contains common to all languages logic form utbot-intellij to avoid cyclic dependencies in project building LanguageAssistant access to dynamically connect API from language dependent modules. Now exists Python, JS and JVM assistants. BaseTestModel - parent class for PythonTestModel, JsTestModel and GenerateTestModel. This class was created because GenerateTestModel use JVM specific functions utbot-intellij-python, utbot-intellij-js modules: These modules contain language-specific implementations of LanguageAssistans, BaseTestModel, DialogWindow and other classes. Code generation Previous solution of the problem with different logic for different languages (Java and Kotlin) in code generation which used CodegenLanguage should not be used with new languages. Our solution suggest to use abstract class CgLanguageAssistant which contains information about code generation language (e.g. languageKeywords, getters for CgNameGenerator, CgMethodConstructor...). In language-specific modules we can create implementations with language-specific logic. We did not delete CodegenLanguage.JAVA and CodegenLanguage.Kotln, but it is possible if our solution will be approved. Base implementation for Java and Kotlin we have already added in org.utbot.framework.plugin.api. Analogically we added LanguageTestFrameworkManager to organize test framework logic for different languages. CLI Modules utbot-cli-python and utbot-cli-js contain command line generation and run tests interface for Python and JavaScript. They depends on utbot-cli module. Main language modules: Modules utbot-python and utbot-js can be used from IntelliJ-plugin and from CLI. They contain independent of PSI logic, for example, language UtModels, fuzzing and code generation declarated there. Fixes #1197 Type of Change Please delete options that are not relevant. Refactoring (typos and non-functional changes) New feature (non-breaking change which adds functionality) 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.sh for automatic run generation test from cli and run_test_samples.sh for run generated tests. utbot-js/samples/ Manual Scenario Open Python-, JavaScript-project in IDEA and run UtBot plugin. Or, generate and run test with CLI. Checklist (remove irrelevant options): The change followed the style guidelines of the UTBot project Self-review of the code is passed The change contains enough commentaries, particularly in hard-to-understand areas New documentation is provided or existed one is altered No new warnings New tests have been added All tests pass locally with my changes
Open Graph Description: Description We added Python and JavaScript tests generation. UI To expand UtBot UI functionality we added next new modules: utbot-ui-common module: in this module we used no language-specific In...
X Description: Description We added Python and JavaScript tests generation. UI To expand UtBot UI functionality we added next new modules: utbot-ui-common module: in this module we used no language-specific In...
Opengraph URL: https://github.com/UnitTestBot/UTBotJava/pull/1199
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:eedebce1-a223-ea1f-173d-a7a46672927e |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | BFA6:BBA55:FF49E8:146AE9A:698FED22 |
| html-safe-nonce | 1623b5a868c9477dd59b961b0c79af0a4c6284d34e45966770df22de9670c632 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRkE2OkJCQTU1OkZGNDlFODoxNDZBRTlBOjY5OEZFRDIyIiwidmlzaXRvcl9pZCI6IjY3OTAyNjUzMzQ1MDA2ODMwNDIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7f48d67921180fa56ba438583f7af8b7843066934339d07619e78a8174cd3258 |
| hovercard-subject-tag | pull_request:1093694006 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/UnitTestBot/UTBotJava/pull/1199/checks |
| twitter:image | https://avatars.githubusercontent.com/u/23080942?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/23080942?s=400&v=4 |
| og:image:alt | Description We added Python and JavaScript tests generation. UI To expand UtBot UI functionality we added next new modules: utbot-ui-common module: in this module we used no language-specific In... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/UnitTestBot/UTBotJava git https://github.com/UnitTestBot/UTBotJava.git |
| octolytics-dimension-user_id | 87413538 |
| octolytics-dimension-user_login | UnitTestBot |
| octolytics-dimension-repository_id | 480810501 |
| octolytics-dimension-repository_nwo | UnitTestBot/UTBotJava |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 480810501 |
| octolytics-dimension-repository_network_root_nwo | UnitTestBot/UTBotJava |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3b33c5aedc9808f45bc5fcf0b1e4404cf749dac7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width