Skip to content

Fix apptesting:execute#10009

Merged
lfkellogg merged 3 commits intomainfrom
lk/run_tests
Mar 3, 2026
Merged

Fix apptesting:execute#10009
lfkellogg merged 3 commits intomainfrom
lk/run_tests

Conversation

@lfkellogg
Copy link
Copy Markdown
Contributor

@lfkellogg lfkellogg commented Mar 3, 2026

Description

The yaml format should use finalScreenAssertion but needs to be converted to use successCriteria before including it in the request. This was accidentally broken by #9898.

Scenarios Tested

Ran apptesting:execute locally:

firebase --debug apptesting:execute --app=<app-id> --test-dir=tests build/app/outputs/apk/release/app-release.apk
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a critical bug in the app testing module where test cases were not being properly formatted for execution. Specifically, the field intended for success criteria was incorrectly named and mapped, leading to potential failures in test processing. The changes ensure that test steps are now correctly converted and aligned with the expected data structure, thereby enabling accurate test case execution.

Highlights

  • Bug Fix: Resolved an issue where test cases were not correctly converting finalScreenAssertion to successCriteria before being included in the request for app testing execution.
  • Code Refactoring: Introduced a new helper function fromYamlTestStep to encapsulate the logic for converting YAML test step properties, improving code readability and maintainability.
  • Type Definition Update: Renamed the finalScreenAssertion property to successCriteria within the TestStep interface to align with the correct field name used in the test execution.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • src/apptesting/parseTestFiles.ts
    • Added fromYamlTestStep function to map YAML test step properties to TestStep interface.
    • Modified toTestCaseInvocation to use fromYamlTestStep for converting test steps.
  • src/apptesting/types.ts
    • Renamed finalScreenAssertion to successCriteria in the TestStep interface.
Activity
  • No activity has occurred on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This PR correctly maps finalScreenAssertion to successCriteria to fix apptesting:execute. The approach is sound. I've left a comment regarding an opportunity to improve type safety by avoiding any, in line with the repository's style guide. Also, please note that this change will require updates to the unit tests in src/apptesting/parseTestFiles.spec.ts, which currently expect finalScreenAssertion and will likely fail as a result of this change.

@lfkellogg lfkellogg force-pushed the lk/run_tests branch 2 times, most recently from e2fd4cf to 44a23b4 Compare March 3, 2026 20:40
The test case was not being converted to use the success_criteria field before including it in the request
@lfkellogg lfkellogg requested a review from kaibolay March 3, 2026 20:59
@lfkellogg lfkellogg merged commit 316c7ef into main Mar 3, 2026
59 of 60 checks passed
@lfkellogg lfkellogg deleted the lk/run_tests branch March 3, 2026 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants