Issue
On official website: https://google.github.io/android-testing-support-library/docs/espresso/setup/index.html
they say, that I have to add this:
androidTestCompile 'com.android.support.test:runner:0.5'
but in tutorials I found:
androidTestCompile 'com.android.support.test:rules:0.3'
androidTestCompile 'com.android.support.test:testing-support-lib:0.1'
Which libraries do I need?
Solution
for my latest project I'm using these androidTest
dependencies:
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.squareup.spoon:spoon-client:1.6.2'
androidTestCompile "com.android.support:support-annotations:$SUPPORT_VERSION"
androidTestCompile "com.android.support.test.espresso:espresso-core:$ESPRESSO_VERSION"
Beware that some tutorials might be really out of date. Notice that I'm using com.android.support.test
subLibrary at its latest version 0.5
, not 0.3
.
Also, beware that rules
and runner
are have diferrent contents, so you may use both, but one instead of another
I'm also pretty sure that Google's tutorial about Espresso
is enough and you don't need to use others. Check: https://google.github.io/android-testing-support-library/docs/espresso/
Hope it will help
Answered By - piotrek1543
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.