Title: Many identical `imports` when generating tests into other module · Issue #1286 · UnitTestBot/UTBotJava · GitHub
Open Graph Title: Many identical `imports` when generating tests into other module · Issue #1286 · UnitTestBot/UTBotJava
X Title: Many identical `imports` when generating tests into other module · Issue #1286 · UnitTestBot/UTBotJava
Description: Description Many identical imports when generating tests into other module To Reproduce Install one of the latest UnitTestBot plugin build from main, for example in IntelliJ Idea 2022.2.3 (latest) Open UTBotJava project Open test generat...
Open Graph Description: Description Many identical imports when generating tests into other module To Reproduce Install one of the latest UnitTestBot plugin build from main, for example in IntelliJ Idea 2022.2.3 (latest) ...
X Description: Description Many identical imports when generating tests into other module To Reproduce Install one of the latest UnitTestBot plugin build from main, for example in IntelliJ Idea 2022.2.3 (latest) ...
Opengraph URL: https://github.com/UnitTestBot/UTBotJava/issues/1286
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Many identical `imports` when generating tests into other module","articleBody":"**Description**\r\n\r\nMany identical imports when generating tests into other module\r\n\r\n**To Reproduce**\r\n\r\n1. Install one of the latest UnitTestBot plugin build from main, [for example](https://github.com/UnitTestBot/UTBotJava/actions/runs/3367468745) in IntelliJ Idea 2022.2.3 (latest)\r\n2. Open UTBotJava project\r\n3. Open test generation dialog for \r\n- org.utbot.examples.exceptions.ExceptionExamples \r\n- org.utbot.examples.arrays.ArrayOfObjects\r\n\r\n4. Select some other Test sources root and click Generate Tests\r\n\r\n**Expected behavior**\r\n\r\nGenerated test class should not contain identical imports.\r\nAlso : these imports of classes from other modules are not resolved. How should we keep them?\r\n\r\n**Actual behavior**\r\n\r\nGenerated test class contains many identical imports.\r\n\r\n**Visual proofs (screenshots, logs, images)**\r\n\r\n~~~java\r\nimport org.utbot.examples.exceptions.ExceptionExamples;\r\nimport org.utbot.examples.exceptions.ExceptionExamples;\r\nimport org.utbot.examples.exceptions.ExceptionExamples;\r\n\r\n...\r\n~~~\r\n\r\n~~~java\r\nimport org.utbot.api.mock.UtMock;\r\nimport org.utbot.api.mock.UtMock;\r\nimport org.utbot.examples.arrays.ArrayOfObjects;\r\nimport org.utbot.examples.arrays.ArrayOfObjects;\r\nimport org.utbot.examples.arrays.ArrayOfObjects;\r\n...\r\nimport org.utbot.examples.arrays.ObjectWithPrimitivesClass;\r\nimport org.utbot.examples.arrays.ObjectWithPrimitivesClass;\r\n...\r\n~~~\r\n\r\n**Environment**\r\n\r\nWindows 10 Pro\r\nIntelliJ IDEA 2022.2.3\r\n\r\n**Additional context**\r\n\r\nVerified reproducing on two version of main: \r\n- https://github.com/UnitTestBot/UTBotJava/actions/runs/3370257818\r\n- https://github.com/UnitTestBot/UTBotJava/actions/runs/3367468745","author":{"url":"https://github.com/alisevych","@type":"Person","name":"alisevych"},"datePublished":"2022-11-02T08:06:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1286/UTBotJava/issues/1286"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:96cf00b1-c54a-3fff-77c3-1445df2c21af |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9CF8:10CC91:BDA23A:F14B56:69901523 |
| html-safe-nonce | 4ba7b9670ca76261ae2adc35fe4f21898d76dc73a576db82b0aca2b29e5e6bcb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Q0Y4OjEwQ0M5MTpCREEyM0E6RjE0QjU2OjY5OTAxNTIzIiwidmlzaXRvcl9pZCI6IjExMzE3NzY3MjgzMDQyNDM1NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ec2721cb52faffad9de00c95e5b9e90b8ca5fc4cd2224a2e053d4e06b3234dc0 |
| hovercard-subject-tag | issue:1432679442 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/UnitTestBot/UTBotJava/1286/issue_layout |
| twitter:image | https://opengraph.githubassets.com/024cf0077df40602a2fd3a09e38fa9188d7723de5dd46baa23e574206b1b59e9/UnitTestBot/UTBotJava/issues/1286 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/024cf0077df40602a2fd3a09e38fa9188d7723de5dd46baa23e574206b1b59e9/UnitTestBot/UTBotJava/issues/1286 |
| og:image:alt | Description Many identical imports when generating tests into other module To Reproduce Install one of the latest UnitTestBot plugin build from main, for example in IntelliJ Idea 2022.2.3 (latest) ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | alisevych |
| 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 |
| 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