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

Test generation fails if any unexpected exception occurs for a single method #661

Closed
Markoutte opened this issue Aug 4, 2022 · 0 comments · Fixed by #662
Closed

Test generation fails if any unexpected exception occurs for a single method #661

Markoutte opened this issue Aug 4, 2022 · 0 comments · Fixed by #662
Assignees
Labels
ctg-bug Issue is a bug status-verified Bug fix is verified

Comments

@Markoutte
Copy link
Collaborator

Markoutte commented Aug 4, 2022

Description

When generate a test case if unexpected error occurs for a single method it cancels test generation for whole class.

To Reproduce

  1. IntelliJ IDEA 2022.1.4 with installed plugin is opened.
  2. Go to File -> Settings -> Tools -> UtBot
  3. Set Code analysis slider somewhere in the middle.
  4. Set Mock strategy to Other packages: Mockito, click OK
  5. Add a class with the following code
    public String property(String key) {
        return System.getProperty(key);
    }
  1. Generate tests for it with Mock strategy for Other packages / classes

Expected behavior

The bad test attempts should be passed (but logged) to recognize the problem, but not breaking the output.

Actual behavior

No test generated if symbolic engine is on.

Additional context

The symbolic execution fails for this test after #622 is implemented.

If only fuzzing works the test set is generated normally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ctg-bug Issue is a bug status-verified Bug fix is verified
Projects
Archived in project
2 participants