Title: Introduce custom JavaDoc tags #565 by onewhl · Pull Request #585 · UnitTestBot/UTBotJava · GitHub
Open Graph Title: Introduce custom JavaDoc tags #565 by onewhl · Pull Request #585 · UnitTestBot/UTBotJava
X Title: Introduce custom JavaDoc tags #565 by onewhl · Pull Request #585 · UnitTestBot/UTBotJava
Description: Description Introduce custom JavaDoc tags to make generated code comments structured. @utbot.classUnderTest - Inline link to the enclosing class. @utbot.methodUnderTest - Inline link to the method we test. @utbot.expectedResult - Value we expect to get. @utbot.actualResult - Value we got. @utbot.executes - Executed condition. @utbot.invokes - Invoked method. @utbot.returnsFrom - Statement we return from. @utbot.throwsException - Thrown exception. The list of tags could be expanded Implemented JavadocTagInfo to introduce our custom JavaDoc tags. Implemented CustomJavadocTagProvider and registered it in plugin.xml to support plugin's custom tags. Overrided behavior of JavaDocumentationProvider#generateRenderedDoc and registered it in plugin.xml to render our custom JavaDoc tags correctly. Added a flag useCustomJavaDocTags to UtSettings. Added integration tests. We show only tags that have some non-null value. After plugin's removal, IDE doesn't recognize our custom tags. It doesn't lead to errors, but highlights tags with yellow color. TODO: Add a test in the intellij module in separate PR TODO: @amandelpie suggested to add a tag for display name in (PR-624) in case of JUnit4 in separate PR. TODO: After upgrading to 2022.1 fix comment rendering in separate PR by using default JavaDocInfoGenerator. Fixes #565 Type of Change New feature (non-breaking change which adds functionality) How Has This Been Tested? Automated Testing Run tests SummaryConditionsTest, SummaryMinStackTest, SummaryExceptionClusteringExamplesTest. Manual Scenario Set useFuzzing = false and useCustomJavaDocTags=true in UtSettings. Case 1: check that tags are supported and shown in IDE. Open any Java project in IntelliJ IDEA. Add JavaDoc comment above any method and start typing @utbot -> you will notice that completion works and our custom tags are shown. You can also render comment clicking toggle on the right side of the comment. Case 2: check that the plugin generates comments using custom tags. Open any Java project in IntelliJ IDEA Click on any class/method and select Create tests with UTBot action Check the comments under generated tests. Tested using runIde command. 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 Introduce custom JavaDoc tags to make generated code comments structured. @utbot.classUnderTest - Inline link to the enclosing class. @utbot.methodUnderTest - Inline link to the method ...
X Description: Description Introduce custom JavaDoc tags to make generated code comments structured. @utbot.classUnderTest - Inline link to the enclosing class. @utbot.methodUnderTest - Inline link to the method ...
Opengraph URL: https://github.com/UnitTestBot/UTBotJava/pull/585
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:a425c21b-a092-4081-616a-dc875a1fd67f |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | E3C0:15B152:171F73C:1DA0C4C:6991B032 |
| html-safe-nonce | 6ca835f89eb38c47cea87b17bd6e23cecbe22baebb2401145a0fbc9e63fe8528 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFM0MwOjE1QjE1MjoxNzFGNzNDOjFEQTBDNEM6Njk5MUIwMzIiLCJ2aXNpdG9yX2lkIjoiNjE0MDk4NDcyNTk1MzY4NzYwMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 222f20a2a3128957cdcfb48aabfe9f60944c48eeab20b5a4ca52ad9d9a449f6f |
| hovercard-subject-tag | pull_request:1007427911 |
| 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/585/checks |
| twitter:image | https://avatars.githubusercontent.com/u/10652414?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/10652414?s=400&v=4 |
| og:image:alt | Description Introduce custom JavaDoc tags to make generated code comments structured. @utbot.classUnderTest - Inline link to the enclosing class. @utbot.methodUnderTest - Inline link to the method ... |
| 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 | 848bc6032dcc93a9a7301dcc3f379a72ba13b96e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width