Deploy with confidence

Use testing and debugging features from Gemini in Android Studio to fix bugs faster and release higher-quality apps.

Analyze crash reports

Use Gemini in Android Studio to analyze your App Quality Insights crash reports, generate insights, provide a crash summary, and (when possible) recommend next steps, including sample code and links to relevant documentation.

Generate all of this information by clicking Insights in the App Quality Insights tool window in Android Studio after you enable Gemini from View > Tool Windows > Gemini.

Show insights from Gemini from the App Quality Insights tool window

Generate unit test scenarios

Unit test scenario generation demo

When writing unit tests for your app, Gemini can suggest test scenarios using the context of the code you want to test. When generating unit test scenarios, Gemini includes detailed names and descriptions for your tests, so that you better understand the intention for each suggested test. You need to implement the body of each test yourself.

To generate unit test scenarios, do the following:

  1. Navigate to the class you want to generate unit test scenarios for.
  2. Right-click on the class and select Gemini > Unit test scenarios from the context menu.
  3. In the dialog that appears, select the methods of the class that you want to generate scenarios for, and set the destination package for the tests.
  4. Click OK.
  5. Confirm the destination directory for your tests and click OK.
  6. If the test class already exists, confirm whether you want Gemini to suggest updates to the existing file.

After Gemini processes the request, you should see either a new file with the suggested unit tests or a diff for you to accept recommended changes to an existing file.