Skip to content

Project is not built automatically before UnitTestBot reads classes #2021

@alisevych

Description

@alisevych

Description

There is used Enum variable duplication in the test generated by Symbolic engine.

To Reproduce

  1. Run the 'utbot' project in IntelliJ Idea 2022.3.3 Ultimate
  2. Install plugin built from unit-test-bot/rc2023.3 branch
  3. Create a new IntelliJ project
  4. Create new Java class:
public class B {
    int field = 5;
}
  1. Create new Java class:
public class A {
    B dependency = new B();
    public int b() {
        return dependency.field + 10;
    }
}
  1. Try to generate tests with UnitTestBot action for class A

Expected behavior

All needed classes should be compiled before UnitTestBot starts reading classes and test generation.

Actual behavior

Recompile fails for A.java

Visual proofs (screenshots, logs, images)

image

Environment

Windows 10 Pro
IntelliJ IDEA 2022.3.3 Ultimate
IntelliJ project, JDK 8

Additional context

In the previous versions the whole project was built before test generation was possible.

Metadata

Metadata

Labels

comp-ideIssue is related to IDE supportctg-bugIssue is a bug

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions