Skip to content

Incorrect warning about the Destination package #1915

Closed
@alisevych

Description

@alisevych

Description

When test generation is started for the parent package, there is a warning displayed that Destination package does not match package of the class

To Reproduce

  1. Run the 'utbot' project in IntelliJ Idea
  2. Install one of the latest plugin builds from main
  3. Use plugin to generate tests for utbot-sample/src/main/java/org/utbot/examples/mock/provider
    The ProviderImpl class is inside impl package
  4. Wait for test generation report in IDEA notifications.

Expected behavior

No warning is expected to be shown.
Notification header should be UnitTestBot: unit tests generated successfully

Actual behavior

Notification UnitTestBot: unit tests generated with warnings is shown.
Warning: Destination package does not match package of the class org.utbot.examples.mock.provider.impl. This may cause unnecessary usage of reflection for protected or package-private fields and methods access.

Visual proofs (screenshots, logs, images)

image

Environment

Windows 10 Pro
IntelliJ IDEA 2022.2.4
Gradle, JDK 11

Additional context

The same when generating tests for the parent package of the class.
For example: utbot-sample/src/main/java/org/utbot/examples/mock/aliasing

Metadata

Metadata

Labels

comp-ideIssue is related to IDE supportctg-bugIssue is a buglang-javaIssue is related to Java support

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions