The road to Android automated testing--broadcasting

Source: Internet
Author: User

Here I understand that the broadcast of the test object is mainly obtained through two channels:

1, through the manifest.xml static registration of the broadcast, used to listen to the system broadcast after the operation of its own business logic;

2, through the dynamic registration form of broadcasting, the object is how to send broadcast and receive broadcast after the execution of the logic;

In fact, the 1th is not related to the broadcast test discussed here, the main test object is the logic after receiving, need to design the corresponding unit test case to test, 2nd, the test object is divided into two parts, broadcast is sent correctly? Is the post-receive processing logic correct?

There is a detail to illustrate:

I wrote a receiver to receive the broadcast sent by the application under test, but note that: if the application receiving the broadcast has not been launched since the installation, is not receiving the broadcast (I built the test project will not receive), at this time need to create an empty service to bypass the restrictions, Open service with Intent-filter to open

The road to Android automated testing--broadcasting

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.