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

Getting MockitoException while running all tests simultaneously. #176

Closed
Saroj2Kumar opened this issue Mar 6, 2018 · 4 comments
Closed

Comments

@Saroj2Kumar
Copy link

Saroj2Kumar commented Mar 6, 2018

I have integrated evosuite with gradle project and able to create all test cases. I am able to run individual test-class but while running all test-cases I am getting "MockitoException", exception is as below :

**org.evosuite.shaded.org.mockito.exceptions.base.MockitoException:
ClassCastException occurred while creating the mockito proxy :
class to mock : 'zat.co.group.bas.service.AuthServiceDB', loaded by classloader : 'org.evosuite.runtime.instrumentation.EvoClassLoader@2890c451'
created class : 'zat.co.group.bas.service.AuthServiceDB$$EnhancerByMockitoWithCGLIB$$3cfe3d6', loaded by classloader : 'org.evosuite.shaded.org.mockito.internal.creation.util.SearchingClassLoader@69d6a7cd'
proxy instance class : 'zat.co.group.bas.service.AuthServiceDB$$EnhancerByMockitoWithCGLIB$$3cfe3d6', loaded by classloader : 'org.evosuite.shaded.org.mockito.internal.creation.util.SearchingClassLoader@ec2bf82'
instance creation by : ObjenesisInstantiator

You might experience classloading issues, disabling the Objenesis cache might help (see MockitoConfiguration)**

Kindly see this issue, and suggest me anything needs to change or configure.

@gofraser
Copy link
Member

gofraser commented Apr 6, 2018

Can you please confirm whether this issue persists in version 1.0.6? We have fixed a number of issues with Mockito recently.

@gofraser
Copy link
Member

gofraser commented Apr 8, 2018

This seems to be the problem fixed in dd311ab. Unless you can confirm that it still happens with 1.0.6 I will consider this resolved.

@gofraser
Copy link
Member

I'm closing this issue since it seems to be fixed with dd311ab, and I haven't heard any objections.

@mdev111
Copy link

mdev111 commented Nov 25, 2018

it still happens with 1.0.6
but I'm using mvn.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants