Saturday, 10 September 2016

How to Configure Junit with Android Studio

We have seen how to Install and create a project in Android Studio. Before starting automation testing we need to configure Junit Testing framework with Android Studio. Junit Testing Framework helps us define flow of execution. Let us learn more about Junit.

What is Junit?

Junit is widely used testing framework along with Java Programming Language. You can use this automation framework for both unit testing and UI testing.It helps us define the flow of execution of our code with different Annotations. Junit is built on idea of "first testing and then coding" which helps us to increase productivity of test cases and stability of the code.

Important Features of Junit Testing - 

1. It is open source testing framework allowing users to write and run test cases effectively.
2. Provides various types of annotations to identify test methods.
3. Provides different Types of Assertions  to verify the results of test case execution.
4. It also gives test runners for running tests effectively.
5. It is very simple and hence saves time.
6. It provides ways to organize your test cases in form of test suits.
7. It gives test case results in simple and elegant way.
8. You can integrate Jnuit with Eclipse ,Android Studio,Maven & Ant

Junit With Android Studio

1. Create a new Android Studio Project or Open your existing project.
2. Go to App -> Build.gradle.



3. In the file add the line of code as shown in below screenshot.


4. click on sync.


5. Once you get Buid Successful Message then your Junit Setup is ready for use.

27 comments:

  1. Pretty 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..
    Mobile App Development Company
    Mobile App Development Company
    Mobile app Development Companies

    ReplyDelete
  2. The blog gave me idea to configure Junit with android My sincere Thanks for sharing this post and please continue share to Share this post
    Software Testing Training in Chennai

    ReplyDelete
  3. This site has lots of advantage.I found many interesting things from this site. It helps me in many ways.Thanks for posting this again.
    Java Training in Chennai
    Best Java Training Institutes in Chennai

    ReplyDelete
  4. Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing.Nice article i was really impressed by seeing this article, it was very interesting and it is very useful for me.


    SeleniumTraining in Chennai

    ReplyDelete
  5. I really enjoy simply reading all of your weblogs. Simply wanted to inform you that you have people like me who appreciate your work. 
    Six Sigma Certification Training in Chennai | Linux Certification Training in Chennai | Microsoft Certification Training in Chennai

    ReplyDelete
  6. I like your post. It really useful with me. Thanks for sharing these useful information!
    Android Project Center in Chennai | Android Project Center in Velachery

    ReplyDelete
  7. I feel Happy to read your Blog,its really amazing with useful information.keep updating.
    Cloud Computing Project Center in Chennai | Cloud Computing Projects in Velachery

    ReplyDelete
  8. Your article is really an amazing with useful content, thank you so much for sharing such an informative information. keep updating.
    AWS Training Institute in Chennai | Best AWS Training Center in Velachery | AWS Training in Perungudi | AWS Training in Kanchipuram

    ReplyDelete
  9. Great post and informative blog.it was awesome to read, thanks for sharing this great content to my vision. This is a great inspiring article.I am pretty much pleased with your good work. You put really very helpful information. Keep it up. Keep blogging. Looking to reading your next post..

    Best Python Training in Chennai | Python Certification Training Centers in Chennai | Python Exams in Chennai | Python Exam Center in Chennai

    ReplyDelete
  10. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging…This is a great inspiring article.I am pretty much pleased with your good work. You put really very helpful information. Keep it up. Keep blogging. Looking to reading your next post..


    Best Python Training in Chennai | Python Certification Training Centers in Chennai | Python Exams in Chennai | Python Exam Center in Chennai

    ReplyDelete
  11. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging…
    Embedded System Training Institute in Kanchipuram | Embedded Training Center in Kanchipuram

    ReplyDelete
  12. Great post....Thank you for posting the great content……I found it quiet interesting, hopefully you will keep posting such blogs…Keep updating your creative and awesome blog.

    Best Python Exam Center in Chennai | Python Certification Training in Chennai | Python Training in Chennai | Python Exams in Chennai

    ReplyDelete
  13. This is a great inspiring article.I am pretty much pleased with your good work. You put really very helpful information. Keep it up. Keep blogging. Looking to reading your next post,.Thank You For Sharing This Information..
    Best CCNA Training Institute in Chennai | CCNA Training Center in Velachery

    ReplyDelete
  14. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging…
    Best Linux Training Institute in Kanchipuram | No.1 Linux Training Center in Kanchipuram

    ReplyDelete
  15. Great post and informative blog.it was awesome to read, thanks for sharing this great content to my vision. This is a great inspiring article.You put really very helpful information. Keep it up. Keep blogging. Looking to reading your next post..
    Best Python Exam Center in Chennai | Python Certification Training in Chennai | Python Training in Chennai | Python Exams in Chennai

    ReplyDelete
  16. Your article is really amazing with useful information you are shared,its very helpful for everyone.Thanks a lot for sharing such an informative information.keep updating..
    Best Python Exam Center in Chennai | Python Exams in Chennai | Python Exams in Velachery

    ReplyDelete
  17. Very informative post and useful post so happy to read this article share it for everyone.Pretty post. Whatever we accumulated data from the web journals, we ought to actualize that in basically then no one but we can comprehend that precise thing obviously.

    Linux Training Institute in Chennai | Linux Training Institute in Velachery

    ReplyDelete
  18. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging…
    Best Java Training Institute in Chennai | Java Training in Velachery

    ReplyDelete
  19. It’s really a nice and helpful piece of information. I’m satisfied that you just shared this helpful information with us. Please stay us informed like this. Thanks for sharing.
    MatLab Training Institute in Chennai | MatLab Training in Velachery

    ReplyDelete
  20. Nice Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one,keep updating..

    Best AWS Training Institute in Taramani | No.1 AWS Training Center in Taramani

    ReplyDelete
  21. Your article is really amazing with informative information,you are shared.Thanks a lot for sharing this wonderful blog.keep updating such a excellent post with us.
    Embedded System Training in Tambaram | Embedded Training in Tambaram

    ReplyDelete
  22. Very informative blog. Helps to gain knowledge about new concepts and techniques. Thanks a lot for sharing this wonderful blog.keep updating such a excellent post with us.
    Best MatLab Training Institute in OMR | No.1 MatLab Training Center in OMR

    ReplyDelete
  23. I feel really happy to have seen your webpage and look forward to so many more entertaining times reading here. Thanks once more for all the details.
    Best CCNA Training Institute in Guindy | No.1 CCNA Training Institute in Guindy

    ReplyDelete
  24. Very informative blog. Helps to gain knowledge about new concepts and techniques. Thanks a lot for sharing this wonderful blog.keep updating such a excellent post with us.
    AWS Exam Center in Chennai | AWS Certification Exams in Chennai | AWS Exams in Velachery

    ReplyDelete
  25. Thank you for your post. This was really an appreciating one. You done a good job. Keep on blogging like this unique information with us.
    Best Embedded Training Institute in Thiruvanmiyur | No.1 Embedded Training Institute in Thiruvanmiyur

    ReplyDelete
  26. Great post and informative blog.it was awesome to read, thanks for sharing this great content to my vision. This is a great inspiring article.I am pretty much pleased with your good work. You put really very helpful information. Keep it up. Keep blogging. Looking to reading your next post..
    AWS Exam Center in Chennai | AWS Certification Exams in Chennai | AWS Exams in Velachery

    ReplyDelete