Mobile Development 7 min read

Custom Fiddler Plugin for Mobile App Network Testing and Performance Analysis

This article introduces a customized Fiddler plugin that enhances mobile app testing by analyzing packet size, request latency, frequency, coverage, and simulating various network speeds, helping QA teams detect backend interface anomalies and improve test completeness.

Baidu Intelligent Testing
Baidu Intelligent Testing
Baidu Intelligent Testing
Custom Fiddler Plugin for Mobile App Network Testing and Performance Analysis

1. Background and Purpose

Current mobile app front‑end testing often overlooks backend network interface anomalies, leading to coarse‑grained testing and unclear coverage of backend APIs. While QA follows checklists for functional points, they struggle to grasp the extent of backend interface coverage.

Fiddler is commonly used for HTTP capture and request crafting, but the native plugin lacks analysis of packet size, request duration, frequency, coverage, and network speed control. This article presents a development practice by Baidu Quality Department for a customized Fiddler plugin.

2. Tool Implementation Principle

Fiddler works by intercepting Windows' WinNet interface, allowing hooks at request/response forwarding stages via four interfaces: AutotamperRequestBefore, AutotamperRequestAfter, AutotamperResponseBefore, AutotamperResponseAfter. Implementing these methods in a custom plugin satisfies various testing needs.

The plugin provides the following functions:

Detect abnormal network packets, e.g., oversized payloads, to identify redundant data and reduce app traffic.

Identify request timeout issues by measuring excessive response times, revealing potential backend logic errors.

Monitor request frequency anomalies, such as improper caching or mistimed requests causing repeated calls.

Analyze interface coverage to guide test focus and avoid missed cases.

Modify request/response latency to simulate different network conditions (2G, 3G, Wi‑Fi, offline).

3. Main Features

1) Packet Size Analysis

The "Packet Size" tab lists requests filtered by host.ini and sorts them by packet size in descending order, helping locate abnormal network packets.

The Reset button shows two numbers representing total traffic and total elapsed time during testing.

Two windows display real‑time packet size and request count, indicating peak values.

2) Request Duration Analysis

After filtering, URLs are sorted by request latency (ClientBeginRequest to ClientDoneResponse). High latency requests are flagged as abnormal.

3) Request Count

Comparing request counts with test execution helps identify duplicate requests.

4) Interface Coverage Monitoring

Configured in coverurl.ini, covered interfaces are shown as filled squares; uncovered ones remain empty. A pie chart visualizes overall coverage, aiding QA in assessing backend API testing completeness.

5) Network Speed Control

Using a TrackBar slider, testers can simulate various network conditions such as unrestricted Wi‑Fi, 3G (40‑500 kb/s), 2G (8 kb/s), or complete disconnection.

Combining these features enables comprehensive testing of various network anomaly cases.

4. Future Possibilities

The current implementation focuses on interface data monitoring, but further extensions could allow modification of interface data, effectively turning the plugin into a generic mobile app testing mock platform.

References

Fiddler development official documentation: http://docs.telerik.com/fiddler/Extend-Fiddler/ExtendWithDotNet

Proxyperformance-monitoringmobile appnetwork testingFiddler
Baidu Intelligent Testing
Written by

Baidu Intelligent Testing

Welcome to follow.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.