Visitar URL original
Feature request: improve error message when Espresso `Intent` matching fails due to mismatched `Intent` `data` · Issue #2112 · android/android-test · GitHub
Skip to content

Feature request: improve error message when Espresso Intent matching fails due to mismatched Intent data #2112

Open

Description

@stkent

When Espresso Intent-matching fails to find a matching intent, it prints an error message:

"Found unverified intents.\n\nUnverified intents:%s\n\nRecorded intents:%s",
joinOnDash(unverifiedIntents), joinOnDash(recordedIntents)));

that includes string representations of all expected Intents and all recorded Intents.

Currently, this error message obfuscates the data associated with each Intent, because ResolvedIntentImpl::toString:

"%s handling packages:[%s]", super.toString(), getPossibleResolutionPackages()));

relies on Intent::toString rather than Intent::toInsecureString.

This makes debugging difficult if the reason for the Intent matching failure is a discrepancy in Intent data. Ideally, ResolvedIntentImpl::toString would use Intent::toInsecureString rather than Intent::toString, but I don't know how feasible that is.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions