Evaluating AI Coding for Mobile Apps: Balancing Completion Rate, Execution Time, and Cost
This article explains how to evaluate AI coding agents for mobile app development beyond simple code generation speed. It breaks down four core metrics—pass rate, average completion degree, execution time, and running cost—clarifying what each actually measures and where each can be misleading. It then examines why higher completion often correlates with longer execution times, why mobile long-horizon tasks tend to fail, and how to build a reproducible internal evaluation pipeline. The goal is to help teams measure net delivery value: continuously reducing total effort from requirement to acceptance under clear quality and security constraints.
1. From Generating Code to Delivering Engineering Results
AI-assisted coding for mobile development is evolving from localized code completion to executing engineering tasks that span files and modules. A developer’s request may no longer be “fill in a function,” but rather “implement a feature with UI interaction, data persistence, and exception handling,” or “complete a module migration while preserving existing behavior.”
Such tasks require a continuous chain of work: understanding requirements, locating code, designing a solution, implementing changes, verifying builds, and fixing issues. A deviation at any step can cause the final deliverable to fail.
Therefore, evaluating AI coding capability cannot focus solely on generation speed or on how many files were modified. The more important questions are: Does the deliverable meet the requirements? Does it run reliably? Is it easy for humans to review? And how much time and resources were consumed to achieve those results?
The evaluation phenomena described in this material can be abstracted into a general engineering question: Is a higher average completion degree sufficient to offset longer execution time and higher running cost? Answering this requires first clarifying what each metric actually measures, rather than choosing based on leaderboard rankings alone.
2. Four Core Metrics, Each Answering a Different Question
2.1 Pass Rate: How Many Tasks Met Acceptance Criteria
Pass rate typically describes the proportion of tasks that satisfy the defined acceptance conditions. In the simple case where each task runs once with equal weight, it can be expressed as:
Pass rate = number of tasks passing acceptance ÷ total number of tasks.
It comes close to what development teams care about—“can it be delivered”—but its meaning depends heavily on the acceptance rules. For example, whether the evaluation only checks build success, whether it runs interaction tests, and whether it verifies data consistency all affect the final result.
The same label “passed” may mean the code compiles, the core flow works, or the feature fully meets functional and quality requirements. Numbers under different criteria are not directly comparable.
If the evaluation includes repeated runs, task weighting, or aggregation across result groups, the specific calculation method should be disclosed. When the task count is small, the success or failure of a single task can noticeably shift the result, so a slight lead should not be interpreted as a stable advantage.
2.2 Average Completion Degree: How Far from Delivery
Completion degree describes how much of a task’s requirements have been satisfied, but it has no naturally unified calculation standard. A reliable approach is to break each task into verifiable acceptance items before evaluation begins, with an explicit weight for each item.
For example, an offline data entry feature can be checked separately for page rendering, input validation, local saving, data recovery, and error messaging. Even if a run fails to pass all acceptance items, it may have completed most of the work.
However, completion degree does not equal deliverability. If the UI and the happy path are fully built but saving fails, the core feature may still be unusable. Requirements related to security, data integrity, and critical business behavior should not be “averaged away” by a large number of low-risk acceptance items.
2.3 Execution Time: How Long Until a Result
Timing requires clear boundaries. It can be the total duration from task submission to execution completion, or only the agent’s actual working time; it may or may not include environment setup, dependency downloads, and queue waiting.
These differences directly affect judgment. A tool that generates modifications quickly but requires long developer effort to fix the environment does not necessarily deliver real efficiency. Conversely, a tool that is slower during execution but provides clear test evidence and reviewable patches may reduce subsequent manual effort.
Teams are advised to record at least three separate figures: time to first output, total automated execution time, and total delivery time after human takeover.
2.4 Running Cost: Cost Per Run Is Not Cost Per Delivery
Direct running cost usually covers only part of resource consumption. Real engineering cost may also include compute environments, storage, testing resources, human review, failed retries, and rework.
Therefore, both “cost per run” and “cost per accepted task” should be observed. The latter can be calculated by dividing total investment within a unified statistical period by the number of tasks that ultimately pass acceptance.
If no task passes acceptance during the period, this should be stated directly rather than producing a meaningless average cost per success. Code that has not passed but remains usable should be recorded separately for its value under human takeover, instead of being arbitrarily converted into a successful result.
3. The Possible Relationship Between High Completion and Long Execution Time
Long-horizon tasks often involve multiple feedback loops:
Understand requirements → modify code → run builds and tests → analyze failures → modify again.
More verification and repair can sometimes improve completion degree, but longer execution time does not necessarily mean higher quality. Two situations should be distinguished.
The first is effective investment. Examples include adding missed boundary conditions, discovering and fixing regressions, or verifying page behavior across different lifecycle states. These operations add time but may reduce delivery risk.
The second is ineffective looping. Examples include repeatedly running the same failing build, switching back and forth between multiple approaches, or continuously modifying code without verifying hypotheses. Such behavior consumes resources without necessarily moving the task closer to completion.
Therefore, whether long execution time is worthwhile cannot be judged from the final score alone; process records must be examined: What problems did the additional time solve? Did it reduce remaining defects? Did it produce reusable test and diagnostic evidence?
Similarly, a high average completion degree with a limited pass rate may indicate that the system can build the main structure in most tasks but tends to get blocked at final integration, boundary conditions, or acceptance details. In that case, improving task decomposition and verification mechanisms may be more effective than simply increasing running time.
4. Why Long-Horizon Mobile Tasks Fail Easily
4.1 Locally Correct Changes Do Not Guarantee Globally Correct Behavior
Mobile apps typically involve UI state, data layers, asynchronous operations, and the system lifecycle. A new feature may work on a single path but break after page recreation, background restoration, or repeated operations.
For example, a save button triggering a write does not mean rapid consecutive taps won’t create duplicate records; a page displaying data does not mean the app will correctly restore it after a restart.
Therefore, acceptance must cover state changes, not just static pages and single operations.
4.2 Environment Failures Are Easily Confused with Implementation Failures
Dependency fetch failures, insufficient execution resources, and unavailable test devices are different problems from code logic errors. Counting all of them as implementation failures weakens the explanatory power of the evaluation.
A more reasonable approach is to preserve failure classification and report environment issues and code issues separately. Rules for excluding environment failures must be agreed upon in advance, to avoid selectively adjusting statistical criteria after results come out.
4.3 Ambiguous Requirements Amplify Automation Deviation
Requirements like “optimize the experience” or “improve exception handling” are hard to verify directly. The agent may invest substantial work that diverges from the team’s actual expectations.
Task descriptions should clearly specify inputs, outputs, constraints, exception behavior, and the scope that must not be modified. For uncertain requirements, a confirmation checklist should be established before implementation begins, rather than letting the tool guess product decisions on its own.
5. Building a Reproducible Internal Evaluation Process
Step 1: Build the Task Set from Real Work
The task set should cover the team’s common needs, such as new page development, modifications to existing features, bug fixes, module refactoring, and test completion. It should also be stratified by scale, risk, and dependency complexity.
Using only simple tasks tends to overestimate real capability; using only extremely complex tasks may fail to reflect the tool’s value in day-to-day development. Evaluation samples should serve the team’s decisions, not merely pursue difficulty.
Step 2: Fix Code and Environment Conditions
Every run should use an explicit code snapshot, build configuration, dependency state, and test data. When external services are involved, controlled test environments should be used wherever possible to reduce interference from network fluctuations and data changes.
If different solutions use different permissions, running budgets, or numbers of human prompts, these differences should be explicitly listed. Results obtained under inconsistent conditions should not be treated as pure capability differences.
Step 3: Pre-Define Acceptance Criteria and Resource Budgets
Acceptance criteria should include both functional requirements and necessary quality constraints. The resource budget should specify maximum execution time, allowed retry counts, available compute resources, and rules for human intervention.
Budgets should be determined before running. Execution time should not be extended indefinitely just because a result came close to success, or results will be difficult to reproduce and compare.
Step 4: Preserve Process Evidence and Perform Failure Attribution
It is recommended to keep task descriptions, code diffs, build logs, test reports, execution durations, and human operation records. For key mobile interactions, necessary runtime screenshots or operation records can also be preserved.
Failure causes can be classified into categories such as requirement understanding, code location, implementation logic, integration adaptation, environment anomalies, and acceptance gaps. The purpose of classification is not to assign blame, but to identify problems that can be solved through process improvements.
Step 5: Repeat Verification for Stochastic Executions
A single success does not guarantee stable success, and a single failure does not necessarily represent long-term performance. For important task types, repeated runs should be arranged when the budget allows, and result variance should be reported.
Comparisons should also use paired results on identical tasks wherever possible, observing which tasks the differences concentrate on, rather than comparing only a single aggregated average.
6. Turning Evaluation Results into Development Processes
For budget-sensitive, low-risk tasks, execution under a constrained budget can be prioritized, requiring the tool to submit its modifications, test results, and a list of unfinished items. For tasks that fail repeatedly, the decision to retry, split, or hand over to humans should be based on the failure cause, rather than mechanically increasing the number of calls.
For complex refactoring or modifications involving persisted data, a phased approach is more appropriate: first confirm the modification plan, then verify a small-scope change, and finally run the full regression. Phased acceptance exposes directional errors early, avoiding continued investment in a wrong approach.
Human review should also have clear boundaries. Permission changes, sensitive information handling, irreversible data operations, and important business rule modifications should not be approved based solely on automated test results.
In addition, the execution environment should follow the principle of least privilege. Agents should not by default receive production credentials, real user data, or unrestricted external access. Logs, screenshots, and task inputs also need appropriate redaction, so that improving development efficiency does not introduce new data risks.
7. What Should Ultimately Be Measured Is Net Delivery Value
The value of an AI coding tool equals neither its code output volume nor its highest score on any single task. A more complete evaluation should simultaneously consider task success rate, result stability, human takeover cost, defect risk, and subsequent maintenance burden.
Pass rate helps teams judge delivery capability; completion degree helps locate remaining work; execution time reflects the feedback cycle; and cost determines whether usage at scale is sustainable. These metrics should be used jointly, not as substitutes for one another.
The truly actionable selection criterion is this: under explicit quality and security constraints, can the tool continuously reduce the total investment from requirement to acceptance? Building the task set, acceptance rules, and operating boundaries around this goal is what turns AI coding from a one-off capability demonstration into a measurable, manageable, and continuously optimizable engineering process.
