Skip to content

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

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
alisevych opened this issue Aug 3, 2022 · 3 comments · Fixed by #680
Closed

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

alisevych opened this issue Aug 3, 2022 · 3 comments · Fixed by #680
Assignees
Labels
comp-ui Improvements of plugin UI appearence and functionality ctg-bug Issue is a bug status-verified Bug fix is verified

Comments

@alisevych
Copy link
Member

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

@alisevych alisevych added ctg-bug Issue is a bug comp-ui Improvements of plugin UI appearence and functionality labels Aug 3, 2022
@korifey korifey moved this to Todo in UTBot Java Aug 3, 2022
@alisevych alisevych changed the title "set test folder" is shown in dropdown when there is no Test Source root in Gradle project Need to handle absence of Test Source root in Gradle project Aug 3, 2022
@nikitavlaev
Copy link
Member

image
How about this solution?

@alisevych
Copy link
Member Author

It would be good to add a link to how-to: https://www.jetbrains.com/help/idea/testing.html#add-test-root

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 ctg-bug Issue is a bug status-verified Bug fix is verified
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants