Search code examples
androidfirebasefirebase-test-labgoogle-cloud-test-lab

How does Google measure the duration for Firebase test?


I am looking into getting the blaze plan on Google Play's Firebase service, and the pricing guide says I will be charged $1/device/hour. When I look over my current tests there are three different time intervals given to me. On the test execution page it gives me a duration of about 9 minutes. If I go to the page with the specifics of the test it will give me a longer duration like 12 or 13 minutes. Then lastly, the video of the test itself shows that it only actually runs through everything for about 6 minutes. The Firebase website and FAQ don't go into much detail about which of these times is the one that gets charged and while it may seem minuscule 6 vs 12 minutes is the difference between 2 tests and 1. So if anyone who uses Firebase can share their insight I would really appreciate it.


Solution

  • The duration shown on the matrix page (the one listing all executions, e.g. /project/my-project/testlab/histories/bh.abc123/matrices/456) is what is used for billing, rounded up to the nearest minute on a per-execution basis (9 minutes in your case).

    The execution page (e.g. /project/my-project/testlab/histories/bh.abc123/matrices/456/executions/bs.def789) shows end to end time including validation, setup, teardown, post-processing etc. (12 or 14 minutes in your case).

    When running via gcloud, the device usage is printed to the terminal when only a single execution is run, e.g.

    Gcloud prints the test time when running on a single device. e.g.

    08:45:57 Retrieving logcat
    08:46:22 Done. Test time=10 (secs)
    08:46:22 Test is Finished
    

    Which is rounded up to the nearest minute for billing.