Skip to content

Settings UI revision #753

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

Closed
14 tasks
olganaumenko opened this issue Aug 22, 2022 · 1 comment
Closed
14 tasks

Settings UI revision #753

olganaumenko opened this issue Aug 22, 2022 · 1 comment
Assignees
Labels
comp-ui Improvements of plugin UI appearence and functionality status-verified Bug fix is verified

Comments

@olganaumenko
Copy link
Collaborator

olganaumenko commented Aug 22, 2022

Settings UI revision

Description

  • Inconsistent labels in the IntelliJ IDEA plugin UI.
    Product name should be: UnitTestBot (everywhere).
    Some UI elements of UnitTestBot are incongruent with the IntelliJ IDEA UI.
    Some settings are duplicated in the Plugin settings window and Action settings window.

  • Some setting labels are unclear.

  • Redundant "Help" tooltips; each option has a tooltip.
    Let's make UnitTestBot UI consistent with the IntelliJ IDEA design guidelines regarding tooltips and context help. :)

=> Please revise the Settings UI in Cases 1-3 as following.

Case 1. Plugin settings window

Steps To Reproduce

IntelliJ IDEA → File → Settings... → Tools → UtBot

See the Screenshot_1.

Screenshot_1

Actual (OLD) and expected (NEW) behavior

  1. Plugin name — marked with red in the Screenshot_1.
    (OLD) UtBot
    (NEW) UnitTestBot

  2. (OLD) Mock strategy:
    No mocks
    Other packages: Mockito
    Other classes: Mockito

(NEW) //Remove this setting from Plugin settings. Leave it only in Action settings.

  1. (OLD) Language generation:
    Java
    Kotlin

(NEW) Generated test language:
Java
Kotlin

//Please add a tooltip:
You can generate test methods in Java or Kotlin regardless of your source code language.

  1. (OLD) Test with exceptions:
    Failing
    Passing

//Tooltip:
Test behavior when runtime exception occurs

(NEW) Tests with exceptions:
Fail
Pass
//Please remove the tooltip.

  1. (OLD) Hanging test timeout: milliseconds

(NEW) //Please add a tooltip:
Test generation may hang due to infinite loops or other code conditions. Set timeout to stop waiting for hanging process.

  1. (OLD) Force static mocking:
    Force static mocking
    Do not force static mocking

(NEW) Force mocking static methods: [checkbox]

//Please add a tooltip:
Overrides other mocking settings.

  1. (OLD) Class
    //java.util.Random
    //etc

(NEW) //Please make this field open only when "Force mock static methods:" is checked.
Classes to be forcedly mocked:
//java.util.Random
//etc

  1. Please check "Test generation method" setting UI update #863.

Case 2. Generate... dialog window

Steps To Reproduce

Open the existing Java project in IntelliJ IDEA.
Open the Java file.
In the Editor tool window right-click any line containing a method or a class → Generate...

See the Screenshot_2.

Screenshot_2

Actual (OLD) and expected (NEW) behavior

  1. (OLD) Generate… (right-click menu) → Create Tests with UTBot… → Generate tests with UTBot
    (NEW) Generate… (right-click menu) → Tests with UnitTestBot… → Generate Tests with UnitTestBot

Case 3. Action settings window

Steps To Reproduce

Open the existing Java project in IntelliJ IDEA.
Right-click the required package or a file in the Project tool window, scroll the menu down to the bottom and choose Create Tests with UTBot… (right-click menu) → Generate tests with UtBot

See the Screenshot_3 for item 1.

Screenshot_3

See the Screenshot_4 for items 2-10.

Screenshot_4

Actual (OLD) and expected (NEW) behavior

  1. (OLD) Create Tests with UTBot… (right-click menu) → Generate tests with UtBot
    (NEW) Generate Tests with UnitTestBot… (right-click menu) → Generate Tests with UnitTestBot

  2. (OLD) Code generation language:
    Java
    Kotlin
    //Tooltips:
    Generate unit tests in Java
    Generate unit tests in Kotlin

(NEW) Please remove this setting from the Action settings window.

  1. (OLD) Test framework:
    JUnit4
    JUnit5
    TestNG

//Tooltips:
Use JUnit4 as test framework
Use JUnit5 as test framework

(NEW) Testing framework:
JUnit4
JUnit5
TestNG

Please remove the tooltips.

  1. (OLD) Mock strategy:
    No mocks
    Other packages: Mockito
    Other classes: Mockito
    //Tooltips:
    Do not use mock frameworks at all
    Mock all classes outside the current package except system ones
    Mock all classes outside the class under test except system ones

(NEW) Mocking strategy:
Do not mock
Mock package environment
Mock class environment
//Please add the tooltip:
Mock everything around the target class or the whole package except the system classes. Otherwise mock nothing.

  1. (OLD) Mock static:
    No static mocking
    Mockito static mocking
    //Tooltips:
    Do not use additional settings to mock static fields
    Use static methods mocking

(NEW) Mock static methods: yes/no (checkbox)
Please remove the tooltips.

  1. (OLD) Timeout for class: sec
    //Tooltip:
    The execution timeout specifies time for symbolic and concrete analysis

(NEW) Test generation timeout per class: seconds
Please remove the tooltip (TBD).

  1. (OLD) Parametrized tests:
    Not parametrized
    Parametrized
    //Tooltips:
    Do not generate parametrized tests
    Generate parametrized tests

(NEW) Parameterized tests: yes/no (checkbox)
Please remove the tooltips.
Please move this setting up (after the "Testing framework:" setting).

  1. (OLD) Generate test methods for:

(NEW) Generate tests for:

Environment

Windows 10 Pro
UnitTestBot
IntelliJ IDEA 2022.1.3 (Ultimate Edition)

Additional context
Please check the expected settings sequence.

For Plugin settings window:

  • Generated test language:
  • Hanging test timeout:
  • Tests with exceptions:
  • Overflow detection:
  • Force mock static methods:
  • Classes to be forcedly mocked:
  • Test generation method:

For Action settings window:

  • Test source root:
  • Testing framework:
  • Parameterized tests:
  • Mocking strategy:
  • Mock static methods:
  • Test generation timeout per class:
  • Generate tests for:
@olganaumenko olganaumenko added the comp-ui Improvements of plugin UI appearence and functionality label Aug 22, 2022
@korifey korifey moved this to Todo in UTBot Java Aug 22, 2022
@alisevych
Copy link
Member

Suggestions - TBD

  1. Use Simple/Advanced mode switch of one dialog window. Hide advanced settings by default - not to frighten the user.
    So several settings from Settings -> Tools -> UTBot can be shown on Action settings window - when Advanced mode is on.

  2. Code analysis. Currently it's counter-intuitive that slider position more to the right results in more deep analysis.
    Is there a suitable UI element which will have fill according to the proportion?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-ui Improvements of plugin UI appearence and functionality status-verified Bug fix is verified
Projects
Archived in project
Development

No branches or pull requests

5 participants