Deep Link

Mobile Testingintermediate

// Definition

A URL that opens a specific screen inside an app rather than its home screen — e.g. `myapp://orders/1042` or a universal `https://` link that the OS routes into the app. Deep links power notifications, share flows, and marketing campaigns, and they break quietly: a malformed link or unhandled path dumps the user on the wrong screen or a crash.

// Why it matters

Deep links are a high-traffic entry point that's easy to forget in test plans — every push notification, email CTA, and shared link is a deep link. QA matters because they fail in ways manual happy-path testing misses: cold-start vs warm-start routing, links to gated content while logged out, and malformed paths.

// How to test

// Drive deep links via Appium and assert the right screen opens
// (cold start — app not running)
await driver.terminateApp('com.myapp')
await driver.execute('mobile: deepLink', { url: 'myapp://orders/1042', package: 'com.myapp' })
expect(await driver.$('~order-detail-1042').isDisplayed()).to.be.true

// gated content while logged out → should route to login, not crash
await driver.execute('mobile: deepLink', { url: 'myapp://account/settings', package: 'com.myapp' })
expect(await driver.$('~login-screen').isDisplayed()).to.be.true

// Common mistakes

  • Testing only warm start (app already open), missing cold-start routing bugs
  • Not testing deep links to auth-gated screens while logged out
  • Ignoring malformed/unknown paths (should fail gracefully, not crash)

// Related terms