I need to use in my android instrumented tests mockito
and powermock
.
The main problem is that both of them have some problems with configuring it in gradle
because of conflicts and other stuff.
Maybe somebody who has working configuration of .gradle
file for mockito+powermock
in android
instrumented tests could share it?
This is my gradle configuration to use mockito and powerMock:
dependencies {
...
/**Power mock**/
testCompile "org.powermock:powermock-core:1.7.3"
testCompile "org.powermock:powermock-module-junit4:1.7.3"
testCompile "org.powermock:powermock-api-mockito2:1.7.3"
/**End of power mock **/
}
NOTE: I had to remove the mockito dependency in order to make it works:
//Remove this line
testImplementation "org.mockito:mockito-core:2.13.0"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With