Title: Summaries are not generated with default useFuzzing setting · Issue #428 · UnitTestBot/UTBotJava · GitHub
Open Graph Title: Summaries are not generated with default useFuzzing setting · Issue #428 · UnitTestBot/UTBotJava
X Title: Summaries are not generated with default useFuzzing setting · Issue #428 · UnitTestBot/UTBotJava
Description: Description When UtSettings::useFuzzing has its default value true, no summaries are generated for test cases created by the symbolic engine. Summaries are correctly generated when useFuzzing settings is set to false. To Reproduce Make s...
Open Graph Description: Description When UtSettings::useFuzzing has its default value true, no summaries are generated for test cases created by the symbolic engine. Summaries are correctly generated when useFuzzing setti...
X Description: Description When UtSettings::useFuzzing has its default value true, no summaries are generated for test cases created by the symbolic engine. Summaries are correctly generated when useFuzzing setti...
Opengraph URL: https://github.com/UnitTestBot/UTBotJava/issues/428
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Summaries are not generated with default useFuzzing setting","articleBody":"**Description**\r\n\r\nWhen `UtSettings::useFuzzing` has its default value `true`, no summaries are generated for test cases created by the symbolic engine. Summaries are correctly generated when `useFuzzing` settings is set to `false`.\r\n\r\n**To Reproduce**\r\n\r\nMake sure that `$HOME/.utbot/settings.properties` does not contain `useFuzzing = false` line (i.e., the default value is used).\r\n\r\nGenerate tests for a class (e.g., `utbot-sample/src/main/java/org/utbot/examples/algorithms/BinarySearch.java`).\r\n\r\n**Expected behavior**\r\n\r\nTest cases generated by the symbolic engine contain summaries (JavaDoc, `@DisplayName`, informative method names).\r\n\r\n**Actual behavior**\r\n\r\nTests are sequentially numbered, no JavaDoc is provided, no `@DisplayName` is provided.\r\n\r\n**Visual proofs (screenshots, logs, images)**\r\n\r\nFirst 3 tests have been generated by the fuzzer and have informative names and `@DisplayName`.\r\nAll other tests have been generated by the symbolic engine and have no summaries.\r\n\r\n```\r\n @Test\r\n @DisplayName(\"leftBinSearch: array = long[10], key = 0L -\u003e return 1\")\r\n public void testLeftBinSearchReturnsOneWithNonEmptyPrimitiveArrayAndCornerCase() {\r\n BinarySearch binarySearch = new BinarySearch();\r\n long[] longArray = {\r\n 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,\r\n 0L, 0L\r\n };\r\n\r\n int actual = binarySearch.leftBinSearch(longArray, 0L);\r\n\r\n assertEquals(1, actual);\r\n }\r\n\r\n @Test\r\n @DisplayName(\"leftBinSearch: array = long[10], key = Long.MAX_VALUE -\u003e return -1\")\r\n public void testLeftBinSearchWithNonEmptyPrimitiveArrayAndCornerCase() {\r\n BinarySearch binarySearch = new BinarySearch();\r\n long[] longArray = {\r\n 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,\r\n 0L, 0L\r\n };\r\n\r\n int actual = binarySearch.leftBinSearch(longArray, Long.MAX_VALUE);\r\n\r\n assertEquals(-1, actual);\r\n }\r\n\r\n @Test\r\n @DisplayName(\"leftBinSearch: array = long[0], key \u003c 0L -\u003e return -1\")\r\n public void testLeftBinSearchWithEmptyPrimitiveArray() {\r\n BinarySearch binarySearch = new BinarySearch();\r\n long[] longArray = {};\r\n\r\n int actual = binarySearch.leftBinSearch(longArray, -1L);\r\n\r\n assertEquals(-1, actual);\r\n }\r\n\r\n @Test\r\n public void testLeftBinSearch1() {\r\n BinarySearch binarySearch = new BinarySearch();\r\n long[] longArray = {-255L};\r\n\r\n int actual = binarySearch.leftBinSearch(longArray, -128L);\r\n\r\n assertEquals(-1, actual);\r\n }\r\n\r\n @Test\r\n public void testLeftBinSearch2() {\r\n BinarySearch binarySearch = new BinarySearch();\r\n long[] longArray = {-255L};\r\n\r\n int actual = binarySearch.leftBinSearch(longArray, -255L);\r\n\r\n assertEquals(1, actual);\r\n }\r\n\r\n @Test\r\n public void testLeftBinSearch3() {\r\n BinarySearch binarySearch = new BinarySearch();\r\n long[] longArray = {-255L, -255L};\r\n\r\n int actual = binarySearch.leftBinSearch(longArray, -255L);\r\n\r\n assertEquals(1, actual);\r\n }\r\n\r\n @Test\r\n public void testLeftBinSearch4() {\r\n BinarySearch binarySearch = new BinarySearch();\r\n \r\n /* This test fails because executable under testing alg.BinarySearch.leftBinSearch\r\n produces Runtime exception java.lang.NullPointerException */\r\n binarySearch.leftBinSearch(null, -255L);\r\n }\r\n\r\n @Test\r\n public void testLeftBinSearch5() {\r\n BinarySearch binarySearch = new BinarySearch();\r\n long[] longArray = {-251L, -252L};\r\n\r\n assertThrows(IllegalArgumentException.class, () -\u003e binarySearch.leftBinSearch(longArray, -255L));\r\n }\r\n```\r\n\r\n**Environment**\r\n\r\n`UtSettings::useFuzzer` should be set to `true` to reproduce the bug.\r\n","author":{"url":"https://github.com/dtim","@type":"Person","name":"dtim"},"datePublished":"2022-07-06T07:45:05.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/428/UTBotJava/issues/428"}
| 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:34dd7142-f725-8ca4-f1c9-ab6ee7079711 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D1F6:3830A4:2FA7DA:3E816A:698E559C |
| html-safe-nonce | 9dc0fc5e07ea88bbc49cec42cab01bc976bb2255aff8a08d081b665b66ad194b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMUY2OjM4MzBBNDoyRkE3REE6M0U4MTZBOjY5OEU1NTlDIiwidmlzaXRvcl9pZCI6Ijc3NDA2OTY3MDYxMDcyMDA5MjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | aa656a789fec3d1c29fed51f67a72018d6b2950e5f43b4b2191cbae8e4f82740 |
| hovercard-subject-tag | issue:1295373552 |
| 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/428/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4aa0a86e8779ab73c6720d988fb4572834df26f9b77780bd8856216f625f7c13/UnitTestBot/UTBotJava/issues/428 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4aa0a86e8779ab73c6720d988fb4572834df26f9b77780bd8856216f625f7c13/UnitTestBot/UTBotJava/issues/428 |
| og:image:alt | Description When UtSettings::useFuzzing has its default value true, no summaries are generated for test cases created by the symbolic engine. Summaries are correctly generated when useFuzzing setti... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dtim |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0e08b85f0035d49bc4c22868f70a4d30fb8c2a777936895c37e78df095242ddc |
| 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 | 9416d07f3607b074b276ccc81546278f89608a08 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width