GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ArrayList.toString() - fails to generate tests · Issue #391 · UnitTestBot/UTBotJava

ArrayList.toString() - fails to generate tests  #391

New issue
Copy link
New issue
Copy link
Closed
#402
Closed
ArrayList.toString() - fails to generate tests #391
#402
Copy link
Assignees
CaelmBleidd
Labels
ctg-bugIssue is a bugIssue is a bugstatus-verifiedBug fix is verifiedBug fix is verified

Description

@alisevych
alisevych
opened on Jul 4, 2022
Issue body actions

Description

Presence of ArrayList.toString() method leads to test generation failure.

To Reproduce

Steps to reproduce the behavior:

  1. Open IntelliJ IDEA
  2. Plugin is installed
  3. A project with JDK 8/11 is opened
  4. Add a class using ArrayList.toString() method, like:
public class ListToStringExample {

    public void toStringList() {
        Arrays.asList("a", "b", "c").toString();
    }
}

Expected behavior

Tests should be successfully generated

Actual behavior

Failed to generate unit tests... popup is shown.
Timeout increasing is suggested, but that doesn't help.
Failure is displayed in 2-3 seconds , timeout is not reached.

Visual proofs (screenshots, logs, images)

ListToString failed

Environment

Windows 10 Pro
IntelliJ IDEA 2022.1.3
JDK 8, 11

Additional context

Same AbstractCollection.toString() implementation is called for this code - same error is displayed:

public class ListToStringExample {

    public void toStringList() {
        List<String> list = new ArrayList<>();
        list.add("a");
        list.add("b");
        list.add("c");
        list.toString();
    }
}

ListToString failed 2

Activity

  1. alisevych
    assigned
    dtim
    on Jul 4, 2022
  2. alisevych
    added
    ctg-bugIssue is a bugIssue is a bug
    on Jul 4, 2022
  3. CaelmBleidd
    added 5 commits that reference this issue on Jul 4, 2022

    ToString support for abstract collection using makeSymbolic #391

    ca9154e

    ToString support for abstract collection using makeSymbolic #391

    0f2779d

    ToString support for abstract collection using makeSymbolic #391

    dbbdced

    ToString support for abstract collection using makeSymbolic #391

    b381486

    ToString support for abstract collection using makeSymbolic #391

    9202b80
  4. CaelmBleidd
    closed this as completedin #402on Jul 4, 2022
  5. CaelmBleidd
    added a commit that references this issue on Jul 4, 2022

    ToString support for abstract collection using makeSymbolic #391

    3b21112
  6. dtim
    assigned
    CaelmBleidd
    and unassigned
    dtim
    on Jul 5, 2022
  7. alisevych commented on Jul 5, 2022

    @alisevych
    alisevych
    on Jul 5, 2022
    MemberAuthor
    More actions

    Verified on the latest plugin - NOT reproducing

  8. alisevych
    added
    status-verifiedBug fix is verifiedBug fix is verified
    on Jul 6, 2022
  9. alexeyfridman
    added this to UTBot Javaon Jul 6, 2022
  10. alexeyfridman
    moved this to Todo in UTBot Javaon Jul 6, 2022
  11. alexeyfridman
    moved this from Todo to Done in UTBot Javaon Jul 6, 2022
  12. rudolf101
    added a commit that references this issue on Jul 8, 2022

    Squashed commit of the following:

    bf2e0e7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @CaelmBleidd
    CaelmBleidd

Labels

ctg-bugIssue is a bugIssue is a bugstatus-verifiedBug fix is verifiedBug fix is verified

Type

No type

Projects

  • UTBot Java
    Status
    Done
    Show more project fields

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.