Never Wait on the Back-end Again: Test Mobile Apps with TFT Proxy

6 min read

Open Source – Author: Giang Nguyen – Software Engineer

Motivation

If you build mobile apps, some of these will sound familiar:

  • “I need the app to show the empty cart.” Or the expired session, or the failed payment screen. The real back-end won’t give you that state on demand, so you ask for a special test account, wait for a deploy, or add an if (DEBUG) branch you’ll forget to remove.
  • “The screen is broken. Is it the app or the server?” Nobody knows until someone sees what the server actually sent, and that’s hard to see on a phone.
  • “The API isn’t ready yet.” The back-end team is a sprint behind, and you’re blocked until it ships.
  • “It only breaks on slow networks.” Spinners that never stop, double taps, crashes on a timeout. They’re easy to hit in the field and hard to reproduce at your desk.
  • “QA found a bug, but I can’t reproduce it.” The response that caused it is gone, and so is the state it put the app in.
  • “We fixed it once, and it broke again.” The edge case was tested by hand, once, and never again.

Each of these costs hours, and none of them is about writing code. They’re about getting the app into the right state and seeing what really happened. We built TFT Proxy to make that part fast: see every request, change any response, replay any call, and test the app against those changes, without touching the back-end or the app’s code.

TFT Proxy Introduction

TFT Proxy is a native desktop app for macOS and Windows. It sits between your phone or emulator and the internet, shows you every request your app makes, and lets you answer any of them with a response you write on your computer. Change the response, and the app sees it on its very next request. Around that core it adds an API client, a UI test runner for Android and iOS, and a setup screen that gets a new device connected in a couple of minutes. It’s one small binary with the proxy engine built in, with nothing else to install.

Diagram of TFT Proxy between a phone or emulator and the back-end: requests matching a Mock Studio rule get a mock response, others are forwarded

Your device sends its traffic through TFT Proxy on port 8081. Every request shows up in the traffic list. If a request matches one of your mock rules, TFT Proxy answers it with your response. Otherwise it goes to the real server as usual.

The app is organised into five tabs:

TabWhat it’s for
Traffic StreamSee every request and response, live
Mock StudioAnswer chosen requests with your own responses
API ClientSend, replay and organise requests
App TestRun UI test suites on Android and iOS simulators
Device & CA HubConnect devices and install the certificate

Features, benefits and use cases

Traffic Stream

Useful when a screen is broken and you need to know whether the app or the server is to blame.

Requests stream in live, grouped by device, app and domain. On Android, each request is labelled with the app that sent it, and its icon, so you’re not guessing from hostnames. Pick a request to see its headers and body. JSON is formatted, foldable and searchable, even when it’s large. You can pause capture, pin the domains you care about to the top, and export traffic as a HAR file to attach to a bug report.

Mock Studio

Useful when you need a state the back-end won’t give you (an empty list, a 401, a null field), the API isn’t built yet, or you want to see how the app copes with a slow or failing network.

Right-click any captured request and choose Mock Studio…, and TFT Proxy creates a rule from it, pre-filled with the real response. Edit the body, status code or headers, and the next matching request gets your version.\

  • Flexible matching. Match by path (with * wildcards in segments), by wildcard, or by regular expression, including query parameters.
  • Any format. JSON, HTML, XML or plain text, edited in a full code editor.
  • More than responses. Add a delay of up to 30 seconds, simulate a timeout that ends in a 504, or drop the connection outright to see how the app handles a network failure.
  • Session or saved. New rules live for the session by default. Save the ones you want to keep to disk.

API Client

Useful when you want to call an endpoint directly, outside the app, or resend exactly the request that caused a bug.

A full API client, right next to your traffic. Organise requests into collections, switch between environments, add pre-request and post-response scripts, and keep cookies in a cookie jar. Import cURL commands or existing collections to get started quickly. Any captured request can be opened in the API Client with a right-click, so you can change one header, resend, and compare the result.

App Test

Useful when an edge case was fixed once and you want to make sure it stays fixed, on every build.

Run YAML test suites on Android emulators and iOS simulators, with your mocks applied. Suites can check both the UI and the API calls behind it. Every run produces screenshots, crash detection and an HTML report. Each case shows the device screenshot, the UI hierarchy and a log of every step, so a failure is easy to trace.

Device & CA Hub

Useful when you’re connecting a new phone, an emulator, or a teammate’s device.

To read HTTPS traffic, a device has to trust TFT Proxy’s certificate. This tab puts your LAN address, the proxy port, the connected devices and a QR code for the certificate on one screen. For an Android emulator there’s a ready-to-copy adb command that sets the proxy for you. Every installation generates its own unique certificate authority, and you can export it as .cer or .pem for other tools.

Built in everywhere

  • Selective decryption. Only the domains you choose are decrypted. Everything else passes through untouched and shows as Encrypted, so you don’t see traffic you don’t need.
  • Breakpoints. Pause a matching request mid-flight, edit it, then continue or drop it.
  • Right-click actions on any request: open or replay it in the API Client, create a mock, copy it as cURL, decrypt its domain, set a breakpoint, repeat it, or export it as HAR.
  • Clear TLS errors. When a device refuses a connection, the row says why: a missing certificate, certificate pinning, or Android 7+ trust rules.

Who it helps

  • Mobile developers build and test screens against any server state, without waiting on the back-end.
  • QA engineers reproduce bug reports with exact responses, and turn them into repeatable test suites.
  • Back-end developers see exactly what the app sends, and try a response change before deploying it.

Getting Started with TFT Proxy

1. Install. Download TFT Proxy and launch it. The proxy starts automatically on port 8081.

2. Point your device at it. Set the device’s Wi-Fi HTTP proxy to your computer’s LAN IP (shown in the title bar and in Device & CA Hub) and port 8081.

  • Android: Wi-Fi settings → your network → Proxy → Manual. On an emulator, run:
  • iOS: Settings → Wi-Fi → (i) on your network → Configure Proxy → Manual.

3. Trust the certificate. Open Device & CA Hub, scan the QR code on the device, then install and trust the certificate.

4. Decrypt a domain. In Traffic Stream, right-click a request to your API → Decrypt Domain. Its requests now show full headers and bodies.

5. Mock your first response. Right-click a request → Mock Studio…, change the response, and trigger the same call in the app.

That’s it. The app gets your response, and you never touched the back-end.

Future Improvements

Here’s what we’re working on next:

  • AI agents over MCP. Letting AI agents read your captured traffic and device screen to debug APIs and write tests from real evidence. We’ll cover it in its own post.
  • Co-op. Pair two machines on the same network and hand HAR dumps, mock payloads and cURL commands straight to a teammate, with no server in between. It’s still a prototype, but here’s an early look:
  • More guides on this blog: mocking GraphQL, testing slow networks, getting past certificate pinning in debug builds, and writing App Test suites.

Conclusion

Most of the time spent on a mobile bug isn’t writing the fix. It’s getting the app into the right state and finding out what the server really said. TFT Proxy puts the traffic, the mocks, the API client and the tests in one place, so that part takes minutes instead of a day of back-and-forth. Download TFT Proxy, point your phone at it, and mock your first response today.

Read more: software development insights from zen8labs engineers

Related posts

Learn how to write real DAO integration tests using Testcontainers, Spring Boot, JUnit 5, and PostgreSQL—covering setup, best practices, and CI/CD integration.
3 min read

Introduction Odoo’s modular architecture is one of the main reasons for its flexibility and popularity. A crucial feature that makes this modularity possible is inheritance. Inheritance in Odoo allows developers to customize and extend existing models and views without altering the core codebase, ensuring upgradability and clean code management. In my blog, I shall explore two

3 min read
MVI is a unidirectional state management pattern that brings a lot of benefits to the android system. Learn about the benefits and how to use them in this blog.
3 min read