Evaluating AI Coding Agents in Mobile App Development: An Assessment Framework and Practice

    This article explains how to evaluate AI coding agents on complete mobile app engineering tasks instead of isolated algorithm problems. It covers four task types, four core metrics (pass rate, average completion, average duration, and cost per run), a reproducible evaluation process, a sample script for summarizing results, common mistakes in interpreting results, and guidance for teams choosing an approach.

    1. Why Mobile App Development Needs Its Own Evaluation

    General code generation benchmarks usually use algorithm problems or single functions, so they do not reflect real engineering conditions. Mobile app development involves UI layout, page navigation, lifecycle management, permission requests, local storage, network requests, and compatibility across operating system versions. A seemingly simple requirement often requires changes to several modules at once. For this reason, evaluation should use a complete engineering task as the unit. It should test whether an agent can work through the full process, from understanding the requirement to producing a runnable result, in a real codebase.

    2. Four Typical Task Types

    1. App creation: Starting from a blank project or template, build the basic structure, dependency configuration, and first screen. The focus is on engineering conventions and the correctness of the project scaffolding.
    2. Feature development: Add new features to existing code, such as a login flow, paginated lists, or offline caching. The focus is on how well the agent understands the existing code and whether the scope of its changes stays under control.
    3. Code migration: Move old interfaces, outdated patterns, or deprecated coding patterns to a new standard. The focus is on behavioral equivalence and on whether deprecated interfaces are fully replaced.
    4. App conversion: Convert the UI or logic of one technical form into another. The focus is on keeping business logic unchanged while the presentation layer adapts to a new component model.

    Each task type fails in different ways. Creation tasks often fail because of missing configuration. Feature tasks often fail because of coupling with existing code. Migration tasks often miss edge cases. An evaluation set should sample tasks in layers by type. If one type takes up too large a share, it can hide weaknesses in the others.

    3. Four Core Metrics

    3.1 Pass Rate

    Pass rate is the share of tasks that are completed and meet all acceptance criteria. Acceptance criteria usually include a project that builds successfully, all existing tests passing, new tests passing, and key UI flows that automated scripts can complete. Pass rate is the most direct metric, but it is binary. It cannot distinguish a task that was nearly finished from one that went completely off target.

    3.2 Average Completion

    Completion gives each task a continuous score, usually calculated as the share of acceptance criteria met. For example, if a task has ten acceptance criteria and the agent meets eight, the task scores 80%. This metric adds detail that pass rate lacks. If pass rate is low but completion is high, the agent usually came close to the goal, and the remaining problems tend to cluster in the final steps.

    3.3 Average Duration

    Duration measures the time from assigning a task to receiving the submitted output. It depends on inference speed, the number of tool calls, the retry strategy, and how much human intervention occurs. Evaluations should record whether human intervention during a task is allowed. Without this record, results from different runs cannot be compared.

    3.4 Cost per Benchmark Run

    Cost usually consists of inference fees and infrastructure fees, calculated for one complete benchmark run. Cost correlates strongly with task length, because long tasks generate more context and more tool calls. Cost is best plotted against pass rate on the same chart, which shows the trade-off between results and investment.

    4. Designing a Reproducible Evaluation Process

    1. Fix the task set: Version-control task descriptions, initial code, and acceptance scripts, and record every change.
    2. Fix the environment: Lock dependency versions, the operating system version used to simulate the runtime, and the hardware configuration. Environment changes make historical results less useful as a reference.
    3. Standardize the agent configuration: Use the same context length, tool permissions, timeout thresholds, and retry count for every task in a batch.
    4. Automate judgment: Prefer executable acceptance methods, such as build checks, unit tests, and UI automation, to reduce subjective scoring.
    5. Run multiple times and use statistics: Repeat each task several times and report the mean and the range of variation. Do not keep only the best run.
    6. Review a sample manually: Spot-check the code quality of tasks marked as passed. This helps identify gaming, such as bypassed tests or hardcoded logic.

    5. Example: Code for Summarizing Results

    1. from dataclasses import dataclass
    2. from statistics import mean
    3. @dataclass
    4. class TaskResult:
    5. passed: bool
    6. completion: float # Value range: 0.0 to 1.0
    7. duration_hours: float
    8. cost_usd: float
    9. def summarize(results: list[TaskResult]) -> dict:
    10. total = len(results)
    11. if total == 0:
    12. raise ValueError("Result set is empty")
    13. return {
    14. "pass_rate": sum(r.passed for r in results) / total,
    15. "avg_completion": mean(r.completion for r in results),
    16. "avg_duration_hours": mean(r.duration_hours for r in results),
    17. "cost_per_run_usd": sum(r.cost_usd for r in results),
    18. }

    This function only handles statistical aggregation. The automated acceptance checks upstream decide whether each task passes. When outputting results, save the raw details as well, so the results can be traced and recalculated later.

    6. Common Mistakes in Interpreting Results

    Mistake 1: Ranking only by pass rate. Two approaches with similar pass rates can differ several times over in duration and cost, and they may suit different scenarios.

    Mistake 2: Ignoring task distribution. If one task type dominates the evaluation set, the conclusions cannot be applied directly to other development scenarios.

    Mistake 3: Treating a single run as a stable result. Agent output is somewhat random, so differences in a small sample may only reflect variation.

    Mistake 4: Ignoring human intervention. Results that do not record the number of interventions cannot show how autonomous the agent really was.

    7. Recommendations for Teams

    Teams that are sensitive to budget and need fast iteration can prioritize cost and duration, and accept a lower pass rate. They can use agents for low-risk work such as template generation and repetitive modernization work. Where delivery quality is critical, pass rate and completion should come first, and manual review should stay in the process.

    Whichever approach a team chooses, it should build an internal task set that is close to its own business and use real requirements instead of generic samples. The purpose of evaluation is to support decisions, so every conclusion should trace back to specific tasks and specific metrics.