Skip to content

Spring Integration tests UI changes #2266

Closed
@alisevych

Description

@alisevych

Tests type and configuration

Unit tests can be generated in No Configuration and Spring configuration mode.
Integration tests can be generated only with existing Spring configuration.

Tests type and mock strategy

Unit tests are generated with Engine only.

  • in No configuration mode any mock strategy can be used, default one is Mock everything outside the class.
  • in Spring configuration mode is defaulted to Mock using Spring configuration and disabled.

Integration tests are generated with Fuzzing only, so mocking is defaulted to Do not mock and disabled.

Tests type and other settings

  • When No Configuration or XML configuration is selected, Tests type is disabled and defaulted to Unit tests.
  • When existing Spring configuration is selected (excluding XML configurations), Tests type is enabled and two options available: Integration tests and Unit tests.
  • When Integration tests is selected, Test frameworks must contain JUnit4 and JUnit5
    TestNG must disappear from the list of suggestions.
  • When Integration tests is selected, XML configuration list must disappear from the list of suggestions in Spring configuration.

Environment

IntelliJ IDEA Ultimate 2023.1

Summarizing. How UI is working in Spring projects

  1. If Spring dependency is detected, there appear 3 additional controls:
    Spring configuration, Tests type, Active profiles
    They influence one another, Mocking strategy, Mock static methods and Parameterized tests
  2. If No configuration is selected,
    a. Tests type = Unit tests and disabled
    b. Active profiles = default and disabled
    c. Mocking strategy is enabled can have any value from regular suggestion list
  3. When some Spring configuration is selected from list of suggestions,
    a. Tests type = Unit tests by default,
    b. if existing Spring configuration is selected and it is not XML-based - Integration tests is present in list of suggestions for Tests type
    c. Parameterized tests = false and disabled
  4. If one of XML-based configurations is selected as Spring configuration,
    a. Tests type = Unit tests
  5. When Unit tests is selected together with one of existing Spring configuration,
    a. Mocking strategy = Mock using Spring configuration and disabled
    b. Mock static methods = true and disabled
  6. When Integration tests is selected together with one of existing Spring configuration,
    a. Mocking strategy = Do not mock and disabled
    b. Mock static methods = false and disabled
  7. If Mocking strategy is Do not mock - with or without Spring configuration,
    a. Mock static methods = false and disabled

Metadata

Metadata

Labels

comp-springIssue is related to Spring projects supportcomp-uiImprovements of plugin UI appearence and functionalityctg-enhancementNew feature, improvement or change request

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions