Problems in android unit testing

Source: Internet
Author: User

Yesterday I also just summarized an article on unit testing in my blog. Who knows that I encountered a problem when I wrote a unit test this afternoon and had to solve it until now.

The following problem is always prompted during unit test execution:

The connection to ADB is down, and a severe error has occured.

...

Test launch failed: cocould not connect ::

Connect to eclipse test result listener failed

Before this problem, I had a problem because of the example of a mobile phone Test Written by a student who installed the pea pod. Who knows that the pea pod occupies the ADB running Android, and the project cannot run, in this case, stop the pod process and run the project. In order to avoid similar problems, I simply unmounted the pods and did not expect to report the above errors when running the unit test. Solution:

CMD jump to the SDK tools file path
ADB kill-Server
Then ADB start-Server

It is okay to run the pod again. My personal summary: it may be that the ADB service involved by the Pod itself needs to be restarted after it is uninstalled.

Post it on your blog, hoping to help you.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.