Skip to content

UTBot doesn't show test source from other modules for Gradle project #1060

Closed
@tyuldashev

Description

@tyuldashev

Description

Assume there is Gradle project where two modules exist, one with test source and second one without. When user tries to generate tests in the latter module UTBot shows error instead of suggesting folder from the first module or to create new one.

To Reproduce

Steps to reproduce the behavior:

  1. Create Gradle project with two modules, one of which has test sources deleted (or use attached one)
  2. Open Junit5GradleJava11\driver\src\main\java\org\test\Printer.java
  3. Try to generate tests with UTBot (Alt-Shift-U)

Expected behavior

UTBot opens Generate tests dialog and either suggests test folders from another module or to create test source in current module.

Actual behavior

UTBot shows error and doesn't open dialog Generate Tests
Visual proofs (screenshots, logs, images)

image

Additional context

No such problem in Intellij type project - UTBot suggest to create test folder.

Pleas note that currently user can select test roots from another module only in Gradle project.

Metadata

Metadata

Labels

ctg-bugIssue is a bug

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions