Skip to content

Fuzzer generates uncompilable test methods in Contest Estimator #111

@sergeypospelov

Description

@sergeypospelov

Description

Test methods produced by fuzzer can't be compiled.

To Reproduce

Steps to reproduce the behavior:

  1. Open UtBotJava project
  2. Run the contest estimator (ContestEstimator.kt) from IDEA on with the following config
val timeLimit = 20 methodFilter = null projectFilter = listOf("guava-26.0") tools = listOf(Tool.UtBot)

Expected behavior

Tests are supposed to be generated and successfully compiled.

Actual behavior

Tests are generated, but are not compilable. If we disable fuzzer, the number of uncompilable methods decreases significantly

Visual proofs (screenshots, logs, images)

image

@Test public void test<init>ByFuzzer0() { /* This test fails because executable under testing com.google.common.util.concurrent.AtomicDoubleArray.<init>  produces Runtime exception java.lang.NegativeArraySizeException */ new AtomicDoubleArray(Integer.MIN_VALUE); } ///endregion

I suppose the fuzzer is getting the wrong method for analyzing.

Environment

Project tree to the failed and compiled tests:
image

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions