Skip to content

Generate test action is enabled in editor for the file located in test source root #469

Closed
@EgorkaKulikov

Description

@EgorkaKulikov

Description

Generate test action is enabled in editor for the file located in test source root

To Reproduce

  1. Create a class with methods under test in test source root
  2. An action is disabled in project tree, but enabled in editor
  3. Click OK in dialog window

Expected behavior

Action is disabled, no generation process starts

Actual behavior

Action is enabled, generation process fails with an exception

java.util.NoSuchElementException: Collection contains no element matching the predicate.
	at org.utbot.framework.util.SootUtilsKt.jimpleBody(SootUtils.kt:172)
	at org.utbot.engine.UtBotSymbolicEngine.<init>(UtBotSymbolicEngine.kt:151)
	at org.utbot.framework.plugin.api.UtBotTestCaseGenerator.createSymbolicEngine(UtBotTestCaseGenerator.kt:273)
	at org.utbot.framework.plugin.api.UtBotTestCaseGenerator.access$createSymbolicEngine(UtBotTestCaseGenerator.kt:51)
	at org.utbot.framework.plugin.api.UtBotTestCaseGenerator$generateTestCases$4$1$1.invokeSuspend(UtBotTestCaseGenerator.kt:161)

Visual proofs (screenshots, logs, images)

image

Metadata

Metadata

Assignees

Labels

comp-uiImprovements of plugin UI appearence and functionalityctg-bugIssue is a bug

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions