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

Couldn't generate some tests: 2 occurrences of org.mockito.MockedStatic #981

Closed
tyuldashev opened this issue Sep 20, 2022 · 0 comments · Fixed by #1066
Closed

Couldn't generate some tests: 2 occurrences of org.mockito.MockedStatic #981

tyuldashev opened this issue Sep 20, 2022 · 0 comments · Fixed by #1066
Assignees
Labels
ctg-bug Issue is a bug

Comments

@tyuldashev
Copy link
Collaborator

Description
In some case when mocking strategy applied no test code is generated.

To Reproduce

  1. Use UNitTestBotJava project to reproduce the problem
  2. In UTBot settings enable Force mocking static methods and Code analysis to Deeper only
  3. Open class utbot-sample/src/main/java/org/utbot/examples/mock/MockStaticMethodExample.java
  4. Generate tests for the class with following settings: Mock strategy = Mock class environment, Mock static methods enabled

Expected behavior

Some tests are generated

Actual behavior

One empty test is generated:

    public void testUseStaticMethod_errors() {
        // Couldn't generate some tests. List of errors:
        // 
        // 2 occurrences of:
        // org.mockito.MockedStatic

    }
@tyuldashev tyuldashev added the ctg-bug Issue is a bug label Sep 20, 2022
@korifey korifey moved this to Todo in UTBot Java Sep 20, 2022
@Damtev Damtev moved this from Todo to In Progress in UTBot Java Oct 3, 2022
Repository owner moved this from In Progress to Done in UTBot Java Oct 5, 2022
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
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants