GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add --fuzzing-ratio to CLI by Markoutte · Pull Request #2496 · UnitTestBot/UTBotJava

Conversation

@Markoutte

@Markoutte Markoutte commented Aug 10, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

Description

  1. Now, CLI can be set with specific fuzzing ration instead of default 0.1. If no option is specified, then the default one is used.
  2. Source option is not required anymore. When --source option is absent then no javadocs is generated

Self-check list

  • I've set the proper labels for my PR (at least, for category and component).
  • PR title and description are clear and intelligible.
  • I've added enough comments to my code, particularly in hard-to-understand areas.
  • The functionality I've repaired, changed or added is covered with automated tests.
  • Manual tests have been provided optionally.
  • The documentation for the functionality I've been working on is up-to-date.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Markoutte
Improve CLI:
2a79a7d
1. Fix error with classloader
2. Add an option to control fuzzer ration
@Markoutte Markoutte added ctg-enhancement New feature, improvement or change request comp-fuzzing Issue is related to the fuzzing comp-cli Issue related to CLI labels Aug 10, 2023
@Markoutte
Markoutte requested a review from denis-fokin August 10, 2023 09:26
@Markoutte
We can ignore --source option
57555e4
denis-fokin
denis-fokin reviewed Aug 10, 2023
View reviewed changes
Comment thread utbot-cli/src/main/kotlin/org/utbot/cli/GenerateTestsCommand.kt
projectRootPath == null -> {
println("The path to the project root is required to generate a report. Please, specify \"--project-root\" option.")
}
sourceCodeFile == null -> {

@denis-fokin denis-fokin Aug 10, 2023

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if we need curly braces here )

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
denis-fokin
denis-fokin reviewed Aug 10, 2023
View reviewed changes
Comment thread utbot-cli/src/main/kotlin/org/utbot/cli/GenerateTestsCommand.kt
@@ -149,9 +148,12 @@ class GenerateTestsCommand :
projectRootPath == null -> {
println("The path to the project root is required to generate a report. Please, specify \"--project-root\" option.")

@denis-fokin denis-fokin Aug 10, 2023

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be we should not ask specifying but suggest specifying the source code. Otherwise the user may think that it is mandatory for proper work of utility.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@Markoutte Markoutte Aug 11, 2023

Copy link
Copy Markdown
Collaborator Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --project-root is mandatory only when --sarif is set. In others cases it is not mandatory

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Markoutte
Markoutte requested a review from denis-fokin August 16, 2023 06:42
ghost
ghost reviewed Feb 26, 2024
View reviewed changes
Comment thread utbot-cli/src/main/kotlin/org/utbot/cli/GenerateTestsAbstractCommand.kt
.long()
.default(LONG_GENERATION_TIMEOUT)

private val fuzzingRation by option(

@ghost ghost Feb 26, 2024

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: "ration" seems misused here. Consider calling this property fuzzingRatio instead of fuzzingRation.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
ghost
ghost reviewed Feb 26, 2024
View reviewed changes
Comment thread utbot-cli/src/main/kotlin/org/utbot/cli/GenerateTestsAbstractCommand.kt
Comment on lines +128 to +132
private val fuzzingRation by option(
"--fuzzing-ratio",
help = "Specify the ratio between symbolic engine and fuzzing"
)
.double()

@ghost ghost Feb 26, 2024 •
edited by ghost
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to this comment from @tyuldashev, the default is 0.1 fuzzing, 0.9 symbolic. If we take the help text literally, then the default "ratio between symbolic engine and fuzzing" would be 0.9 ÷ 0.1 = 9. But from my understanding of the code, 9 is not a valid value here, and this argument should actually be 0.1 to mimic the default behavior.

Consider revising this option's name and help text to reflect its actual semantics and to document its default behavior. For example:

private val fuzzingFraction by option(
        "-z",
        "--fuzzing-fraction",
        help = "Specifies the fraction of time spent using fuzzing instead of the symbolic engine (default: $DEFAULT_FUZZING_VALUE)"
)
        .double()
        .default(DEFAULT_FUZZING_VALUE)
        .validate { require(it in 0.0 .. 1.0) { "should be between 0.0 and 1.0." } }

where DEFAULT_FUZZING_VALUE is the default value of org.utbot.framework.plugin.api.TestFlow.fuzzingValue: currently 0.1.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@denis-fokin denis-fokin Awaiting requested review from denis-fokin
1 more reviewer
Reviewers whose approvals may not affect merge requirements

At least 2 approving reviews are required to merge this pull request.

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

comp-cli Issue related to CLI comp-fuzzing Issue is related to the fuzzing ctg-enhancement New feature, improvement or change request

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@Markoutte @denis-fokin
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.