Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Error test has strange name and doesn't contain Throw in it. JUnit4. #2376

Closed
tyuldashev opened this issue Jul 6, 2023 · 1 comment · Fixed by #2425
Closed

Error test has strange name and doesn't contain Throw in it. JUnit4. #2376

tyuldashev opened this issue Jul 6, 2023 · 1 comment · Fixed by #2425
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

tyuldashev commented Jul 6, 2023

Description
One of generated test for JUnit4 has unusual name testIsCyclic_CEquals1 even though it's properly placed in error suite and has comment about thrown exception it has no Throw in the name as it was expected.

To Reproduce

  1. Install UnitTestBot plugin built from main in IntelliJ IDEA
  2. Open UTbot Java project
  3. Generate tests for org.utbot.examples.algorithms.Graph#isCyclic() with options:
    • JUnit4
    • Mock everything outside the class
    • Disable Mock static methods.

Expected behavior
Error tests have Throw in their names

Actual behavior
One of the test in error suite has name: testIsCyclic_CEquals1

Screenshots, logs

image

Additional info
There is also positive test with similar strange name testIsCyclic_CNotEquals1

Environment

IntelliJ IDEA version - 2023.1.3
UTBot Plugin - 2023.7.4756 (main branch)

@tyuldashev tyuldashev added ctg-bug Issue is a bug comp-summaries Something related to the method names, code comments and display names generation labels Jul 6, 2023
@tyuldashev
Copy link
Collaborator Author

The problem is presented in latest 2023.3 release, but didn't exist in previous - 2022.12.1 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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.

2 participants