Visualizing FunTester: A Detailed Architecture Diagram and Insights
During the Chinese New Year break the author used draw.io (now diagrams.net) to create a comprehensive architecture diagram of the FunTester testing framework, outlining its functional and performance layers, supported protocols, utility modules, and multithreaded execution model.
Framework Overview
The FunTester testing framework is organized into two logical layers: a Functional layer that handles protocol‑level request testing, and a Performance layer that drives load generation, data collection, and reporting.
Functional Layer
This layer provides a unified interface for testing a variety of communication protocols. The primary focus is HTTP API testing, but the framework also includes first‑class support for the following peer protocols:
Socket
Dubbo
Redis
MySQL
MongoDB
Each protocol is encapsulated in its own module so that new protocols can be added without altering the core architecture.
Utility classes supply a large collection of reusable methods (e.g., string handling, date conversion, assertion helpers). In addition, several specialized modules address complex testing scenarios:
XML file parsing – parses configuration and data files.
moco API – creates lightweight mock services for integration tests.
JsonPath – extracts values from JSON responses.
Message handling – formats and validates custom message payloads.
Performance Layer
The performance side consists of three cooperating components:
Multithreaded model – defines how virtual users are created and scheduled.
Executor classes – manage the lifecycle of test cases, start/stop threads, and aggregate results.
Helper classes – provide marker interfaces and abstract base classes that developers extend for specific test scenarios.
Typical usage involves selecting an appropriate virtual class, then implementing the business logic inside the doing() method. The method can issue any supported protocol request (HTTP, Dubbo, etc.). Example skeleton:
public class MyPerformanceTest implements VirtualTest {
@Override
public void doing() {
// Example: send an HTTP request and validate the response
HttpResponse resp = httpClient.get("/api/example");
assertEquals(200, resp.getStatusCode());
// Additional protocol calls (e.g., Dubbo) can be placed here
}
}When a performance test is launched, the executor runs the selected virtual classes across the configured number of threads, automatically collects latency, throughput, and error metrics, performs statistical calculations, and produces graphical reports (e.g., response time distribution, QPS curves) along with raw result data.
Diagram Resources
High‑resolution architecture diagram: http://pic.automancloud.com/structure.html
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
