You are reading this post because you want to go with Espresso
Framework for your functional testing.The framework is very flexible and
allows you to test different functionality with ease and accuracy.Let
us get to the point and start configuring your project with espresso.
To
configure Espresso within your Android Project is very simple and
quick. By the end of this post you will be able to start writing your
tests. In case you face any issues post it here.
Introduction to Espresso Video Tutorial -
Introduction to Espresso Video Tutorial -
Espresso Setup Step by Step Video Tutorial -
1.Espresso works in the same project where your app is build, so first step is to open your project.
2. Open file build.gradle inside- project -> App -> build.gradle and add below line of code at the end.
dependencies { androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' } androidTestCompile 'com.android.support.test:runner:0.5',{ exclude group: 'com.android.support', module: 'support-annotations' } } android { defaultConfig { testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner' } }
3. Then click on sync gradle, once the build is successful you are all set to write Espresso test cases.
Note -
add below code the defaultConfig before running the test case -
Please Share your feedback in comments section below and follow QA Automated to get latest post update.Happy Testing :-)
add below code the defaultConfig before running the test case -
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Note - Learn More About Android Studio HERE
I hope this post helps you find your code coverage for your test suit :)Please Share your feedback in comments section below and follow QA Automated to get latest post update.Happy Testing :-)
Will this Espresso works on existing APK files? Like I want to test the Gmail app. Is it possible to test the app without having the code of Gmail app?
ReplyDeleteThe Espresso is integrated with app's code and so it is not possible to use Espresso without app code.
DeleteExcellent read. Thanks for sharing information software testing. Now Indium software hiring Mobile App Testing Engineers (while you can)
ReplyDeleteThanks for your effort very good information, it is very useful everyone.
ReplyDeleteIn my project after gradle sync i am getting this error "Error:Failed to resolve: org.ccil.cowan.tagsoup:tagsoup:1.2" please help you to fix this issue.
Hi,
ReplyDeleteThanks for visiting my blog. I feel this error is due to other dependency in ur project. try to use multidexenabled true
Thanks & Regards,
Anuja
Hi Anuja
DeleteI would like to learn espresso for industry purpose. Can you share me the links on my mailid (nikhilmit.k@gmail.com), from where could i learn it.
Regards
Nikhil Mittal
This article is very much helpful and i hope this will be an useful information for the needed one. Keep on updating these kinds of informative things...
ReplyDeleteMobile App Development Company
Mobile App Development Companies
Thanks for posting useful information.You have provided an nice article, Thank you very much for this one. And i hope this will be useful for many people.. and i am waiting for your next post keep on updating these kinds of knowledgeable things...Really it was an awesome article...very interesting to read..
ReplyDeleteplease sharing like this information......
Android training in chennai
Ios training in chennai
ReplyDeletePretty article! I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing..
Android App Development Company
it is really amazing...thanks for sharing....provide more useful information...
ReplyDeleteMobile app development company
I am looking for some good blog sites for studying. I was searching over search engines and found your blog site. Well i like your high quality blog site design plus your posting abilities. Keep doing it.
ReplyDeletePSD to Wordpress
wordpress website development
This comment has been removed by the author.
ReplyDeleteFantastic Article ! Thanks for sharing this Lovely Post !!
ReplyDeleteWonderful ! Thanks for Sharing this article keep update this kind of nice articles ..
ReplyDeleteI am happy to find this post Very useful for me, as it contains lot of information
ReplyDeleteSelenium Courses in Chennai
Selenium training Chennai
Thanks for sharing this wonderful blog. Helpful article ! Kindly visit us @ Chocolate gift box
ReplyDeleteAmazing article. Your blog helped me to improve myself in many ways thanks for sharing this kind of wonderful informative blogs in live. I have bookmarked more article from this website. Such a nice blog you are providing ! Kindly Visit Us @ Best Travels in Madurai | Tours and Travels in Madurai | Madurai Travels
ReplyDeleteReally nice topics you had discussed above. I am much impressed. Thank you for providing this nice information here.
ReplyDeleteMobile Game Testing
Gameplay Testing
Switch Game Testing