Trang bạn đã yêu cầu hiện không có sẵn bằng ngôn ngữ của bạn. Bạn có thể chọn ngôn ngữ khác ở cuối trang hoặc dịch nhanh mọi trang web sang ngôn ngữ mà bạn chọn bằng cách sử dụng tính năng dịch được tích hợp sẵn trong Google Chrome.

Run tests with Firebase Test Lab for Android

Quickly test your app with Firebase Test Lab using the Firebase console.
In this article:

Firebase Test Lab for Android lets you run the following types of tests:

  • Espresso, Robotium or UI Automator 2.0 instrumentation tests written specifically to exercise your app.
  • Robo test, which analyzes the structure of your app's user interface and then explores it automatically by simulating user activities.

Before you get started, you need to enable billing for your project. If you don't have an active billing account, add oneand then connect your project to that billing account. You will need ownership or edit permissions in your project.

To run an instrumentation test

  1. On the Firebase console navigation bar, click Test Lab, and then click Get Started -> Run an Instrumentation test.
  2. Click Browse, and then browse to your app APK and test APK before clicking Continue.
  3. Define your test matrix by selecting which devices, Android API levels, screen orientations and locales you want to test your app against. You can select only those device and Android API level combinations that you want to target for testing.
  4. (Optional) Click Show advanced options to change the Test timeout that determines the maximum duration of each test execution.
  5. Click Start <N> Tests, where <N> is the number of valid test configurations from the test matrix that you define on this screen. Each pending test is shown with a blue clock icon while it is waiting to run, and that icon changes to a green check icon when the test has completed.
  6. After each test has run, click the device listed in the Test Execution column to see test results, including test cases, logs, screenshots and videos.

To run a Robo test

  1. On the Firebase console navigation bar, click Test Lab, and then click Get Started -> Run a Robo test.
  2. Click Browse, browse to your app APK, and then click Continue.
  3. Define your test matrix by selecting which devices, Android API levels, screen orientations and locales you want to test your app against.
  4. (Optional) Click Show advanced options to change the following options:
    • Test timeout determines the maximum duration of each test execution.
    • Test account credentials is used to provide credentials for a test account. Note: This feature should never be used with real user accounts.
    • Additional fields is used to provide text input for other text fields in your app.

      Note: To learn more about Test account credentials and additional fields, see Test account sign-in and predefined text.
  5. Click Start <N> Tests, where <N> is the number of valid test configurations from the test matrix that you define on this screen. Each pending test is shown with a blue clock icon while it is waiting to run, and that icon changes to a green check when the test has completed.
  6. After each test has run, click the device listed in the Test Execution column to see test results, including test cases, logs, screenshots and videos.

Create a script to guide Robo test

  1. Open Android Studio.
  2. In the main menu, select Tools > Firebase.
  3. Select Test Lab, and click Record Robo Script and use it to Guide Robo Test.
  4. Follow the rest of the tutorial steps in the Android Studio.

Was this helpful?

How can we improve it?
Search
Clear search
Close search
Google apps
Main menu
16475425065391848099
true
Search Help Center
true
true
true
true
true
5054967
false
false