Skip to content

Identical @DisplayName for tests on enum methods #1588

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
tyuldashev opened this issue Dec 26, 2022 · 3 comments · Fixed by #1782
Closed

Identical @DisplayName for tests on enum methods #1588

tyuldashev opened this issue Dec 26, 2022 · 3 comments · Fixed by #1782
Assignees
Labels
comp-summaries Something related to the method names, code comments and display names generation ctg-bug Issue is a bug

Comments

@tyuldashev
Copy link
Collaborator

Description

When UTBot generates tests for Enum methods then generated test methods have identical names with just method name - @DisplayName("findStateByCode: ")

To Reproduce

Steps to reproduce the behavior:

  1. Open utbot project
  2. Generate tests for org.utbot.examples.enums.State
  3. Open the generated test

Expected behavior

Tests names are different and meaningful

Actual behavior

Methods names are like testFindStateByCode_1 and @DisplayName("findStateByCode: ")

Visual proofs
image

@amandelpie
Copy link
Collaborator

Very strange behaviour of the summaries module: @tyuldashev need to add information to the initial settings - for example percentage of fuzzing value and so on. But if I remember correctly, the enums has very limited support in summaries and not only in summaries

@amandelpie
Copy link
Collaborator

@EgorkaKulikov I suppose it should be repoduced before fixing the bug, probably UTResult and UTExecutions contains zero useful information for generation in case of symbolic execution or fuzzing execution (see FuzzedMethodDescriptions)

@amandelpie amandelpie added the comp-summaries Something related to the method names, code comments and display names generation label Jan 18, 2023
@tyuldashev
Copy link
Collaborator Author

Nothing special, still reproducible with default settings:
image

@sofurihafe sofurihafe self-assigned this Feb 9, 2023
EgorkaKulikov pushed a commit that referenced this issue Feb 10, 2023
Fix empty display names, missing info in summaries, summary tests and add extra summary tests
@github-project-automation github-project-automation bot moved this from Todo to Done in UTBot Java Feb 10, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
comp-summaries Something related to the method names, code comments and display names generation ctg-bug Issue is a bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants