LLensLogger / Guides

VISUAL GUIDE / NETWORK MOCKS

Shape the response.
Keep the app moving.

Use LensLogger to turn a captured request into a repeatable response, slow a call down, or make it fail on purpose. Then replay it and see what your app does.

Explore the workflow
⌁ A field guide to response mocking · Android, iOS & Desktop
LensLogger playground showing a successful mocked response with status 201 and a JSON body
✓
201 CreatedResponse delivered
Mock activePOST · /posts
THE IDEA

A mock is a rule that matches a request and supplies a response locally, so you can test consumer behavior without relying on the live service.

01 / THE WORKFLOW

From captured call
to controlled result.

Start with a real request in the Network tab. LensLogger carries its URL, method, response body, status, and headers into a new rule so you can adjust only what you need.

02

Inspect the response

Switch to Response to check the status, headers, and body before using it as a starting point.

03

Set the response

Tap Mock this. Edit the JSON body or response headers, then create the rule.

You can also add a rule from the Mocks tab with the plus button.

04

Enable and replay

Keep the rule enabled, then make the same request again. The app receives your configured status, headers, and body.

Matches use the full URL exactly. HTTP method comparison ignores case.

02 / MOCK RESULTS

Choose the behavior
you need to test.

A good mock result is visible both where you configure it and where your app consumes it. These examples show success, failure, and request history.

✓SUCCESS RESPONSE

Return a predictable payload

Set the response body and status code your screen expects. Replay the call and verify the consumer renders the new data.

201 CreatedJSON body
!SIMULATED FAILURE

Exercise your error path

Enable Simulate network failure to throw a synthetic I/O failure. Use it to check retry, empty-state, and error messaging.

Failure modeConfigurable delay

RULE CONTROLS

One endpoint.
Different scenarios.

Rules can be enabled or disabled from the Mocks list, edited, or deleted. Add a response delay in milliseconds to exercise loading states.

VISIBLE IN HISTORY

Spot the mocked call.

Mocked network entries carry a MOCK badge. Compare them with earlier live calls to see how the consumer result changed.

MockedLive request

REQUEST HISTORY

Keep the full story in view.

Network history can contain repeated mocked calls, live calls, and failures. Use the endpoint search to narrow the list and open any entry for details.

  • MOCK badge identifies a rule response
  • Status and timing show the consumer outcome
  • Open the entry to inspect request and response data
⌕

MATCHING RULES

Make the match deliberate.

LensLogger selects the first enabled rule whose full request URL matches exactly and whose HTTP method matches without regard to case. Turn off a rule to let the request use its normal path again.

MATCHenabled
+ exact URL
+ same HTTP method
mock response

READY TO TRY IT?

Make the edge case
easy to repeat.

Install LensLogger, capture a request, and create a rule for the behavior you want to see.

Read installation guide