Our UI tests fail for Android 9 because our test environments don't use HTTPS. The problem is that we are making network calls from the espresso tests (for example creating brand new user directly on the back end to be used in the test) which means they run on the espresso test app.
Adding networkSecurityConfig to the app manifest does not help because the app is not the problem but the espresso app.
How can I fix this? Does the espresso app have manifest where I can add that or any way to change this permission programmatically?
My question is different from
CLEARTEXT communication not supported on Retrofit and Android 8: Cleartext HTTP traffic not permitted
Because I can't find a way to access the espresso app manifest. I can make the changes in my app manifest but it does not matter because the app is already working. I'm failing from the espresso part.
Go to Android Manifest
file. In the Application tag, write this line
android:usesCleartextTraffic="true"
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