Skip to content

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

Closed

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

Activity

  1. added
    ctg-bug
    comp-ui
    on Jul 11, 2022
  2. moved this from Todo to In Progress in UTBot Javaon Jul 11, 2022
  3. Repository owner moved this from In Progress to Done in UTBot Javaon Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

comp-uictg-bug

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions