Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Summaries disabled in config file is not applied #1321

Closed
alisevych opened this issue Nov 7, 2022 · 2 comments · Fixed by #1500
Closed

Summaries disabled in config file is not applied #1321

alisevych opened this issue Nov 7, 2022 · 2 comments · Fixed by #1500
Assignees
Labels
ctg-bug Issue is a bug

Comments

@alisevych
Copy link
Member

alisevych commented Nov 7, 2022

Description

enableSummariesGeneration=false is not applied to Java project from global config file settings.properties
Using plugin with:

To Reproduce

  1. Install release build into IDEA
  2. Add enableSummariesGeneration=false to the global config file ~\.utbot\settings.properties
  3. Restart IDEA 2022.2.3 (latest) - to apply settings.properties
  4. Create a new Java project (f.i. Maven project with JDK 11)
  5. Check File -> Settings -> Tools -> UnitTestBot
  6. Generate tests for a sample Java class

Expected behavior

  1. Summaries are supposed to be turned off - as in global config.
  2. Tests are supposed to be generated without Java docs, regions and desriptions.

Actual behavior

  1. Summaries are enabled.
  2. Summaries are generated - as it is default for Java project - with - Summaries should be turned off for Kotlin related generations #1283

Visual proofs (screenshots, logs, images)

image

public final class MainTest {
    ///region Test suites for executable org.example.Main.main

    ///region FUZZER: SUCCESSFUL EXECUTIONS for method main(java.lang.String[])

    /**
     * @utbot.classUnderTest {@link Main}
     * @utbot.methodUnderTest {@link Main#main(String[])}
     */
    @Test
    @DisplayName("main: arg_0 = String[3]")
    public void testMainWithNonEmptyObjectArray() {
        String[] args = {"noimn", "oesjb", "noimn"};

        Main.main(args);
    }
    ///endregion

    ///endregion
}

Originally posted by @alisevych in #1291

@korifey korifey moved this to Todo in UTBot Java Nov 7, 2022
@alisevych alisevych changed the title Summaries disable in config file is not applied Summaries disable in config file is not applied Nov 7, 2022
@alisevych alisevych added the ctg-bug Issue is a bug label Nov 7, 2022
@alisevych alisevych added this to the 2022.12 Release milestone Nov 8, 2022
@amandelpie amandelpie added the comp-summaries Something related to the method names, code comments and display names generation label Nov 8, 2022
@amandelpie
Copy link
Collaborator

This is an area of undefined behavior.
As I see, we have no UI Settings fully synchronized with the UTSettings at this moment.

It's an open question, could we have erase the UI setting with the value from the file?

I could say, that at this moment we have no support for these settings to be synchronized with UI. UI could rule these settings and erase all result in this with its own value.

@alisevych
Copy link
Member Author

@Vassiliy-Kudryashov
Could you please take this issue? Need to find an appropriate solution how global and project settings should be connected.

@alisevych alisevych removed the comp-summaries Something related to the method names, code comments and display names generation label Dec 1, 2022
@Vassiliy-Kudryashov Vassiliy-Kudryashov moved this from Todo to In Progress in UTBot Java Dec 8, 2022
Vassiliy-Kudryashov added a commit that referenced this issue Dec 8, 2022
As for key enableSummariesGeneration, settings.properties provides default value for plugin settings
@Vassiliy-Kudryashov Vassiliy-Kudryashov linked a pull request Dec 8, 2022 that will close this issue
3 tasks
Vassiliy-Kudryashov added a commit that referenced this issue Dec 9, 2022
As for key enableSummariesGeneration, settings.properties provides default value for plugin settings
Repository owner moved this from In Progress to Done in UTBot Java Dec 9, 2022
@Vassiliy-Kudryashov Vassiliy-Kudryashov changed the title Summaries disable in config file is not applied Summaries disabled in config file is not applied Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ctg-bug Issue is a bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants