Title: Selecting one method launches tests for all methods with same signature from nested classes · Issue #1407 · UnitTestBot/UTBotJava · GitHub
Open Graph Title: Selecting one method launches tests for all methods with same signature from nested classes · Issue #1407 · UnitTestBot/UTBotJava
X Title: Selecting one method launches tests for all methods with same signature from nested classes · Issue #1407 · UnitTestBot/UTBotJava
Description: To Reproduce Launch the action on the following class, select only method f and click Generate: class ExampleClass { int f() { return 1; } static class Inner { int f() { return 1; } } } Expected behavior Only tests for ExampleClass.f are...
Open Graph Description: To Reproduce Launch the action on the following class, select only method f and click Generate: class ExampleClass { int f() { return 1; } static class Inner { int f() { return 1; } } } Expected be...
X Description: To Reproduce Launch the action on the following class, select only method f and click Generate: class ExampleClass { int f() { return 1; } static class Inner { int f() { return 1; } } } Expected be...
Opengraph URL: https://github.com/UnitTestBot/UTBotJava/issues/1407
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Selecting one method launches tests for all methods with same signature from nested classes","articleBody":"**To Reproduce**\r\n\r\nLaunch the action on the following class, select only method `f` and click Generate:\r\n```Java\r\nclass ExampleClass {\r\n int f() {\r\n return 1;\r\n }\r\n static class Inner {\r\n int f() {\r\n return 1;\r\n }\r\n }\r\n}\r\n```\r\n\r\n**Expected behavior**\r\n\r\nOnly tests for `ExampleClass.f` are generated.\r\n\r\n**Actual behavior**\r\n\r\nTests are generated for both `ExampleClass.f` and `ExampleClass.Inner.f`\r\n\r\n**Visual proofs (screenshots, logs, images)**\r\n\r\n```\r\npublic final class ExampleClassTest {\r\n ///region Test suites for executable rndpkg.ExampleClass.f\r\n\r\n ///region\r\n\r\n @Test\r\n public void testF2() {\r\n ExampleClass exampleClass = new ExampleClass();\r\n\r\n int actual = exampleClass.f();\r\n\r\n assertEquals(1, actual);\r\n }\r\n ///endregion\r\n\r\n ///endregion\r\n\r\n ///region Tests for Inner\r\n\r\n @Nested\r\n public final class InnerTest {\r\n ///region Test suites for executable rndpkg.ExampleClass$Inner.f\r\n\r\n ///region\r\n\r\n @Test\r\n public void testF1() {\r\n Inner inner = new Inner();\r\n\r\n int actual = inner.f();\r\n\r\n assertEquals(1, actual);\r\n }\r\n ///endregion\r\n\r\n ///endregion\r\n }\r\n ///endregion\r\n}\r\n```\r\n\r\n**Additional context**\r\n\r\nSeems like the problem is in `org.utbot.intellij.plugin.process.EngineProcess#findMethodsInClassMatchingSelected`, more specific, in that `Signature`s doesn't contain info about declaring class.","author":{"url":"https://github.com/volivan239","@type":"Person","name":"volivan239"},"datePublished":"2022-11-22T06:08:04.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/1407/UTBotJava/issues/1407"}
| 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:90a85310-07c2-159b-8df4-8f6440dafefc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ECD8:15BF38:CF44F5:10FF514:698FB87D |
| html-safe-nonce | f179ba93a1ae5227605640e0daf6693283200c612135cb16317fc99c36b0b199 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQ0Q4OjE1QkYzODpDRjQ0RjU6MTBGRjUxNDo2OThGQjg3RCIsInZpc2l0b3JfaWQiOiIzMjQwMzU3NTkwMjc0NjUyMjg1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a19a9a114327653b364806e6fd06d06c982e4847088d0522bf7ff8bc454a500d |
| hovercard-subject-tag | issue:1459171850 |
| 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/1407/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5ec41ab5f64cda7c56f185f958b8b83fd9200346667c2db6d02a544f0d1457d4/UnitTestBot/UTBotJava/issues/1407 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5ec41ab5f64cda7c56f185f958b8b83fd9200346667c2db6d02a544f0d1457d4/UnitTestBot/UTBotJava/issues/1407 |
| og:image:alt | To Reproduce Launch the action on the following class, select only method f and click Generate: class ExampleClass { int f() { return 1; } static class Inner { int f() { return 1; } } } Expected be... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | volivan239 |
| 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 | 4084c47bba08e7ba5fab63cb1dd485a339910ed7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width