OkReplay is a tool for recording and replaying HTTP interactions (specifically via OkHttp) in Android tests to improve determinism, test speed, and reliability. During the first run of a test annotated with @OkReplay, the library records outgoing HTTP requests and their responses into tape files. On subsequent runs, it intercepts those requests and serves the recorded responses instead of making real network calls. This allows tests to be executed offline, reduces flakiness due to network variability, and isolates the test environment from external dependencies. OkReplay integrates with testing frameworks such as JUnit and Espresso, so it fits naturally into Android testing pipelines. Because recording only happens when running with the annotation, production code paths remain unaffected. It’s especially useful when your app’s logic depends on network APIs and you want faster, more reliable unit or integration tests.

Features

  • Records OkHttp network calls during tests for later replay
  • Enables deterministic and offline-capable testing of network interactions
  • Seamlessly integrates with JUnit and Espresso test frameworks
  • No production impact—it activates solely during test execution
  • Results are commit-friendly (recordings stored as version-controlled "tapes")
  • Eliminates need for external proxies or services during testing

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

Apache License V2.0

Follow OkReplay

OkReplay Web Site

Other Useful Business Software
Paessler - Monitor Your Whole Network in Minutes Icon
Paessler - Monitor Your Whole Network in Minutes

Auto-discovery finds your devices and deploys pre-configured sensors instantly. No project plan required, just visibility from day one.

Waiting weeks for a monitoring rollout isn't an option when infrastructure doesn't stop running. PRTG's auto-discovery scans your network and suggests from over 200 pre-configured sensor types, so you're watching servers, applications and devices within minutes, not after a multi-week deployment. Enterprise-strength monitoring, without the enterprise complexity. Start your free trial today.
Start Free 30-Day Trial
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of OkReplay!

Additional Project Details

Programming Language

Groovy

Related Categories

Groovy Libraries

Registered

2025-09-03