-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Labels
comp-codegenIssue is related to code generatorIssue is related to code generatorctg-bugIssue is a bugIssue is a bug
Milestone
Description
Description
Many identical imports when generating tests into other module
To Reproduce
- Install one of the latest UnitTestBot plugin build from main, for example in IntelliJ Idea 2022.2.3 (latest)
- Open UTBotJava project
- Open test generation dialog for
- org.utbot.examples.exceptions.ExceptionExamples
- org.utbot.examples.arrays.ArrayOfObjects
- Select some other Test sources root and click Generate Tests
Expected behavior
Generated test class should not contain identical imports.
Also : these imports of classes from other modules are not resolved. How should we keep them?
Actual behavior
Generated test class contains many identical imports.
Visual proofs (screenshots, logs, images)
import org.utbot.examples.exceptions.ExceptionExamples;
import org.utbot.examples.exceptions.ExceptionExamples;
import org.utbot.examples.exceptions.ExceptionExamples;
...
import org.utbot.api.mock.UtMock;
import org.utbot.api.mock.UtMock;
import org.utbot.examples.arrays.ArrayOfObjects;
import org.utbot.examples.arrays.ArrayOfObjects;
import org.utbot.examples.arrays.ArrayOfObjects;
...
import org.utbot.examples.arrays.ObjectWithPrimitivesClass;
import org.utbot.examples.arrays.ObjectWithPrimitivesClass;
...
Environment
Windows 10 Pro
IntelliJ IDEA 2022.2.3
Additional context
Verified reproducing on two version of main:
Metadata
Metadata
Assignees
Labels
comp-codegenIssue is related to code generatorIssue is related to code generatorctg-bugIssue is a bugIssue is a bug
Type
Projects
Status
Done