Skip to content

Need to handle absence of Test Source root in Gradle project #657

Closed
@alisevych

Description

@alisevych

Description

Need to handle the situation when there is no Test sources root in Gradle project.

To Reproduce

Steps to reproduce the behavior:

  1. Run IntelliJ IDEA
  2. Create a new Gradle project with JDK 8 / 11
  3. Remove test folder from /src - to emulate the situation when there is NO test source root in a User's project
  4. Add some class to the /src/main/java
  5. Open "Create tests with UTBot..." dialog

Expected behavior

/src/test/utbot_tests is suggested to be created as Test source root

or

Some red notification that UTBot cannot generate tests before the User configures a Test source root manually - with a link to documentation on how to do that.

Actual behavior

"set test folder" is displayed as an available option in the dropdown
... button (where a user could select a folder) is disabled

Visual proofs (screenshots, logs, images)

image

Environment

IntelliJ IDEA Ultimate 2022.1.4

Additional context

Tests were run successfully - if utbot_tests folder was located inside /src/test folder

Metadata

Metadata

Labels

comp-uiImprovements of plugin UI appearence and functionalityctg-bugIssue is a bugstatus-verifiedBug fix is verified

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions