[MUSIC PLAYING]
DOUG STEVENSON: Hey, thanks for tuning into another Firecast.
My name is Doug Stevenson, and I'll
give you a quick walkthrough on how
to do the first test of your app with Firebase Test
Lab for Android.
The Firebase team understands that application quality
is extremely important for the long term
health of your app and the business it supports,
and I know from personal experience
that publishing an app with a serious issue
can cost time and money to fix.
And there is a risk that your users might simply
uninstall the app if it's causing them trouble.
To help prevent these problems, you
can use Firebase Test Lab for Android
to maintain a high bar for quality
by testing your app on many devices at the same time.
There's a lot you can do with Test Lab,
so let's just take a look at the easiest way
to get started with Test Lab right now.
OK.
I already have an Android project
created in the Firebase console that I'm using for development.
So let's take a look at that.
Now when I select Test Lab from the features on the left,
the console is telling me that I need
to upgrade to the Blaze plan.
And when I click on the Upgrade button, I see some choices
and that the Blaze plan includes Test Lab.
So when I select Blaze, I notice that I'm
going to be billed for my use of real-time database,
file storage, and web hosting.
But I already have a problem here.
I'm still building out the first version of my app,
and I'm happy with the free SPARC plan.
I don't yet want to start paying for storage and bandwidth used
by my app.
And this is OK.
I don't have to use Test Lab in the project
that I'm using to develop my app.
So if you're like me, and you only
want to pay to use Test Lab for now, what you can do instead
is create a whole new project for all your testing needs.
Then you can just upgrade that project to the Blaze plan,
and you'll only pay for the test that you execute against it.
In fact, you don't even have to add Firebase to your app at all
to be able to test it with Test Lab.
You can simply upload any APK, and Test Lab
will run tests on it in the project
you choose using only the billing
information for that project.
So let's create a new project real fast and upgrade it.
First, I'll go back to the Firebase console main screen.
Then I'll choose to create a new project.
I'll give it a name that makes it clear
what I'm trying to do here and keep the default country.
OK.
Now I'll choose to upgrade this project.
I'll select the Blaze plan, and go ahead with the billing
setup, but I'll stop the recording right here,
because I'm not going to show you my credit card
number today.
So completing the rest of that setup is up to you.
But when I'm done with that, I'll
see my project is now on the Blaze plan, which
means I can run tests with it.
I imagine right now you're wondering what exactly it
costs to test your app.
You should know that your credit card
will be billed five US dollars per physical device hour.
That means if your test runs on five different device
configurations, and you've submitted
a test that takes 12 minutes [INAUDIBLE]
on each device, that's a total of one hour, which costs $5.
Or if you have six distinct device configurations
that each run for 10 minutes, that's
also a total of one hour for $5.
The math is pretty easy, so you get the idea.
Anyway, let's do an easy test.
If I click Test Lab on the left in my upgraded project,
I have an option to run a couple different kinds of tests.
The easiest test to run is a Robo test.
This is an automated intelligent test
that requires no extra coding on my part.
It will operate my app and give a report at the end.
All I have to do is upload an APK
and select the configurations to test with.
Here, I'm just going to select the Nexus 7 and Nexus 5
devices on API levels 21 and 22 in both landscape and portrait.
And I'll leave the default locale of US English.
Now when I scroll down, the console
is telling me that this is a total of six unique tests
in this test matrix.
When I push that button, the tests
are deployed to my selected devices in Test Lab,
and the results will appear sometime later right here
in the console.
And when you get to writing your own instrumentation tests,
you'll be able to run those tests from the console
here as well.
Like I mentioned before, you can run tests
against pretty much any APK.
This means debug or release build types
with or without Firebase integrated,
and you can test multiple different apps
all in the same project.
Oh, and there's one other thing.
If you aren't able to pay for testing,
you can still make use of Firebase Test Lab
by uploading your APK to an alpha or beta channel
in the Google Play Developer console.
All you have to do is opt in to use the Pre-Launch Report
on Google Play.
And from that point on, every APK you upload
to those channels will receive a five-minute Robo
test across several devices at no charge to you.
After a while, those test results
will appear alongside the APK in the channel
where you uploaded it.
So that's all we have time for now.
Stay tuned here to the Firebase channel
on YouTube for more details on Firebase Test Lab for Android
and other Firebase features.
If you have any questions, reach out
to us on Twitter with the hashtag, #askfirebase,
or in the comments below.
My name is Doug Stevenson.
Thanks for watching, and don't forget to test early and often
with Firebase.
[MUSIC PLAYING]