Title: Generate test by fuzzing for methods with no parameters #511 by Markoutte · Pull Request #515 · UnitTestBot/UTBotJava · GitHub
Open Graph Title: Generate test by fuzzing for methods with no parameters #511 by Markoutte · Pull Request #515 · UnitTestBot/UTBotJava
X Title: Generate test by fuzzing for methods with no parameters #511 by Markoutte · Pull Request #515 · UnitTestBot/UTBotJava
Description: Description This PR resolves several issues: This instance now created with any public constructor. Reflection is used only if there's no another ways to create this instance ModelProvider changed its signature to provide a sequence. This is needed to supply values lazily (for example, generate first 10 values and take random) For methods without parameters fuzzer will generate models to change this instance No more fallback for a regular value generating. Thus, fuzzer doesn't generate test using reflection anymore (except case with this instance) Fixes #511 Type of Change Breaking change (fix or feature that would cause existing functionality to not work as expected) How Has This Been Tested? Automated Testing org.utbot.framework.plugin.api.ModelProviderTest Manual Scenario Test method foo from this example: package com.company.objects; public class TestThisInstance { MyObject value; TestThisInstance() {} TestThisInstance(int value) { this.value = new MyObject(); this.value.setField(value); } public boolean foo() { if (value.getField() < 100 || value.getField() == 102) { return true; } return value.getField() % 2 == 0; } } class MyObject { private int field; public int getField() { return field; } public void setField(int field) { this.field = field; } } 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 All tests pass locally with my changes
Open Graph Description: Description This PR resolves several issues: This instance now created with any public constructor. Reflection is used only if there's no another ways to create this instance ModelProvider cha...
X Description: Description This PR resolves several issues: This instance now created with any public constructor. Reflection is used only if there's no another ways to create this instance ModelProvider...
Opengraph URL: https://github.com/UnitTestBot/UTBotJava/pull/515
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:f6be7c7b-cb30-a4e7-32dd-e819fae6180d |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D1CA:1F7AEB:1CA8CA:2473AE:69912342 |
| html-safe-nonce | 511a4d5b191bf5f24177191d64bcd4d2f85b73599646e6f81277a9a50ebfc8dd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMUNBOjFGN0FFQjoxQ0E4Q0E6MjQ3M0FFOjY5OTEyMzQyIiwidmlzaXRvcl9pZCI6Ijc5NjM5NDc5Mzc5MjIzNjAxMzAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e3b4be06699b7ff9fe6c812b09d2d48a1eab1dc38711cf5418b249ac9d638d60 |
| hovercard-subject-tag | pull_request:995222026 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/515/files |
| twitter:image | https://avatars.githubusercontent.com/u/720952?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/720952?s=400&v=4 |
| og:image:alt | Description This PR resolves several issues: This instance now created with any public constructor. Reflection is used only if there's no another ways to create this instance ModelProvider cha... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 |
| disable-turbo | true |
| 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