Developer Console

Testing the startup time for your Fire OS app

Moses Roth Oct 31, 2024
Share:
Testing Best practices
Blog_Header_Post_Img

The first time you start up an app is like the first time you meet someone. Is it love at first sight? Or do they have a stain on their shirt and bad body odor? It’s the same with an app, does it start up quickly and smoothly? Or does it have long loading times and crash? Your customers will expect your app to be fast and responsive, and the best way to demonstrate that is with a quick startup, so that your app always makes a good first impression.

The FireOS Performance Test will help you measure First Frame (Time to Initial Display) to test how fast your app will get up and running.

Set up

To get started you’ll need to:

Selecting target devices

Install

Once you’ve done that, you can install the performance tester with these steps:

1. Clone the performance tester repository by running this command in the terminal:

Copied to clipboard
git clone https://github.com/amazonappdev/fireos-perf-testing.git

2. Navigate to the project directory:

Copied to clipboard
cd fireos-perf-testing

3. Build the project and create the JAR:

Copied to clipboard
mvn clean install

Run the test

You can then run the test with the following steps:

1. Locate the ZIP file FOSTTIDPerfTesting-distribution.zip file in the 'jar' folder

2. Unzip it

3. Navigate to FOSTTIDPerfTesting-distribution > Input > APK folder

4. Copy the APK file you want to test into the APK folder

5.  Rename the APK file Input.apk

6. In the terminal, navigate to the new FOSTTIDPerfTesting-distribution folder

Copied to clipboard
cd FOSTTIDPerfTesting-distribution

7. Decide which kind of test you want to do:

  1. cool
  2. warm
  3. latency (which does both cool and warm tests)

8. Plug your device into your computer (if you haven’t already) and select "Allow USB Debugging" (if you haven’t already)

  1. Be sure that ADB has been set up correctly

9. Get your device serial number (if you don’t already have it on hand) by running

Copied to clipboard
adb devices

10. Run the test with this command:

Copied to clipboard
java -jar PerformanceKpi-jar.jar <Test Type> <Device Serial Number)>

If you decide to go with the full latency command, it should look something like this:

Copied to clipboard
java -jar PerformanceKpi-jar.jar latency GCC2DM000000000S

11. The full latency test can take about an hour to run, so be patient!

Running latency test

12. You’ll find the test results in a folder called test-output in the FOSTTIDPerfTesting-distribution folder.

That’s all there is to it!

For more details, check out the github repo for the FireOS Performance Test. And if you want to dig even deeper into tests you can do on your app, check out the App Health Insights Dashboard, where you can test app latency, memory use, fluidity, and stability.

If you have any questions or feedback, let us know.

Related articles

Sign up for our newsletter

Stay up to date with the latest Amazon Developer news, industry trends and blog posts.