Tagged articles
Mock
37 articles · Page 1 of 1
This guide explains why isolation is crucial for Python unit tests, clarifies the difference between mocks and stubs, introduces core unittest.mock objects, provides five practical scenarios with full code, shares advanced tips, warns about common pitfalls, and offers actionable steps to write robust, dependency‑free tests.
MockMockingPython
0 likes · 8 min read


大转转FEFeb 5, 2026 · Frontend Development
This article presents a comprehensive mock‑data tool for front‑end/back‑end separation that solves request interception, flexible rule matching, business‑semantic data generation via AI, and team‑wide sharing, detailing its architecture, core implementations, code snippets, usage workflow, and future roadmap.
Mockfrontendrequest interception
0 likes · 19 min read

This article walks through a real‑world Go project, showing why adding unit tests to core modules prevents regressions, how to mock tightly‑coupled dependencies, and provides complete example test code and best‑practice tips for reliable backend development.
BackendMocktest-driven development
0 likes · 13 min read


JD TechApr 27, 2025 · Backend Development
The article analyzes data‑consistency challenges caused by RPC timeouts, especially when interfaces lack idempotency or idempotency fails, and presents a lightweight mock/spy utility that can intercept, mock, or spy on service calls to quickly restore consistency in distributed systems.
Data ConsistencyIdempotencyMock
0 likes · 11 min read

This article explores the challenges of data consistency in RPC timeout scenarios, especially when idempotency fails, and introduces a lightweight mock/spy tool that can dynamically configure mock responses for any method call, helping restore consistency without full transaction support.
BackendData ConsistencyMock
0 likes · 16 min read

The talk describes how Tencent News consolidated fragmented legacy APIs by adopting YAPI (with Swagger UI) for unified documentation, dynamic mocking, and automated Swagger generation, instituted full lifecycle governance and monitoring, and leveraged large‑language‑model tools to identify and remediate technical debt, resulting in 26 repos synced and over 750 daily mock calls.
AIAPI ManagementMock
0 likes · 28 min read

This article introduces the pytest-mock plugin, explains when and how to use it for mocking functions, classes, and external services in Python tests, and provides a range of basic to advanced code examples along with important considerations and best‑practice tips.
Mockpytestpytest-mock
0 likes · 9 min read

This article introduces a web‑integrated proxy tool that requires no installation or configuration, enabling developers to share URLs or QR codes for remote HTTP debugging, mock rule sharing, and seamless integration into web pages or mobile apps, while comparing it with traditional proxy solutions.
HTTP interceptionMockProxy
0 likes · 11 min read

This article explains the differences and appropriate use cases of Mock, Dummy, Spy, Stub, and Fake test doubles in PHP unit testing, providing clear code examples to help developers write effective and maintainable tests.
MockPHPTest Doubles
0 likes · 6 min read

This article explains how to write Go unit tests for HTTP handlers that depend on MySQL by using fake implementations and the gomock library to replace the store layer, demonstrating both fake object and mock approaches, code examples, and best practices for isolating external dependencies.
FakeGoGomock
0 likes · 18 min read

This article presents a detailed overview of Python testing tools—including requests, unittest, pytest, mocking libraries, performance measurement plugins, and data generation utilities—illustrating how to write, run, and validate API tests with code examples and best‑practice explanations.
Mockperformancepytest
0 likes · 7 min read

This article explains why unit testing is essential for reusable components, introduces Jest fundamentals, demonstrates how to write and run tests with code examples, and shows how to enhance UI component testing using @testing-library/react, @testing-library/user-event, and @testing-library/jest-dom, providing a complete workflow for reliable front‑end development.
JestMockfrontend
0 likes · 12 min read

Learn how to install and configure the Apifox Helper plugin in IntelliJ IDEA to automatically generate, sync, and debug Java Spring API documentation, offering a zero‑intrusion alternative to Swagger with built‑in mock and testing features.
API DocumentationApifoxIDEA
0 likes · 8 min read

This article analyzes the challenges of fragmented API documentation workflows at DeWu, introduces the Document‑&‑Test‑Driven Development (DTDD) model, and details the architectural and procedural improvements—including data asset consolidation, multi‑level classification, mock services, and automated testing—that boosted documentation utilization and reduced development friction.
API ManagementMockR&D Process
0 likes · 15 min read

Mooncake is a unified data‑mocking platform that lets developers quickly generate and switch multi‑scenario mock data via a Chrome proxy plugin, online configuration service, and capture panel, supporting various client environments, and has been promoted internally through demos, documentation, and feedback loops, now serving hundreds of users and thousands of mock scenes.
Chrome extensionMockPlatform
0 likes · 9 min read

The article proposes a GCC‑plugin‑based tool called TU that automatically extracts AST information from C/C++ source files to generate boundary unit tests, custom cases, and mocks without modifying business code, dramatically reducing the manual effort required for comprehensive test development.
ASTC++GCC
0 likes · 11 min read

This article explains why test data is essential, introduces the Apifox tool as a low‑cost, fast solution for creating both generic and domain‑specific test data, and provides step‑by‑step guidance on using its mock engine, custom rules, batch generation, and automation features to produce reliable testing datasets.
API testingApifoxData Generation
0 likes · 9 min read

This guide walks developers through installing Apifox, importing API specifications, designing and debugging endpoints, configuring environments, creating custom scripts, and generating realistic mock data, demonstrating how the all‑in‑one platform can replace Postman, Swagger, JMeter and other tools for comprehensive API documentation, testing, and automation.
APIApifoxMock
0 likes · 9 min read

This article introduces the testing pyramid, explains unit testing concepts, and provides a step‑by‑step guide for writing Go unit tests using the standard testing package, the AAA pattern, Testify assertions, mocks, and test suites, while highlighting the benefits of fast verification, documentation, and sustainable development.
BackendMockgolang
0 likes · 18 min read

The APP DIFF automated testing solution, presented at iQIYI’s i Technology Conference, combines deep‑link navigation, mock data services, and the AUI image‑diff algorithm within the Uiautomator2 framework to stabilize UI automation, cut execution time, achieve near‑human verification quality, and deliver significant coverage and cost savings across iQIYI mobile products.
AUICI/CDImage Diff
0 likes · 19 min read

This guide explains Go’s built‑in testing framework, assertion libraries, table‑driven and sub‑tests, and demonstrates how to mock functions, structs, interfaces, databases, and Redis using tools such as ngmock, gomock, sqlmock and miniredis, while covering test setup, teardown, coverage handling, and best‑practice insights.
GoMockRedis
0 likes · 21 min read

This article explains how Xianyu tackled the complexity of order‑detail page status handling by designing a three‑layer mock solution that decouples mock logic, provides business‑semantic state switching, and enables fast local and device debugging, dramatically reducing integration and testing costs.
@OrderDebuggingMock
0 likes · 14 min read

This guide explains how to install the iszsw/mock library via Composer, add test controllers with annotation routing and validation, configure static resources, generate nested mock data using MockPack, and produce API documentation, providing complete code examples for PHP backend projects.
APIMockannotation
0 likes · 8 min read

This tutorial explains how to download the Moco‑runner JAR, configure various mock scenarios—including GET, POST, parameterized requests, cookies, headers, and redirects—and run them from the command line or through JMeter for comprehensive API testing.
API testingBackendJMeter
0 likes · 8 min read

This article explains why unit testing is essential, introduces VSCode plugins and Jest configurations that speed up test execution, outlines common testing pitfalls, and details practical test‑case design methods such as equivalence partitioning, boundary‑value analysis, and error‑guessing, while also covering stubs, mocks, and CI integration.
CoverageJestMock
0 likes · 18 min read

This article explains how to build a flexible front‑end mock system by decoupling configuration files, extending webpack devServer proxy hooks, creating a unified request wrapper with Axios, and generating minimal mock.json files for both development and production builds.
AxiosConfigurationDevTools
0 likes · 20 min read

This tutorial walks you through installing YApi, configuring its environment, importing Swagger definitions, managing interfaces, leveraging mock data, enabling automatic sync, and handling permission management, providing a powerful, secure API documentation solution for backend developers.
API ManagementMockSwagger
0 likes · 9 min read

The article explains that stable tests should verify only the parameters that affect the behavior under test, use matchers to ignore irrelevant data, and apply contract testing or realistic fakes for microservice calls instead of over‑relying on mocks, thereby improving readability and resilience.
BackendMockcontract testing
0 likes · 4 min read


58 TechSep 20, 2019 · Backend Development
This article introduces the SQC mock service platform built for the SCF microservice framework, outlines three mock implementation approaches, explains why the third solution was chosen, and details the platform’s architecture, features, and benefits for backend testing and integration.
MockSCFmicroservices
0 likes · 8 min read

This article explains the concept of Mock objects for testing, outlines why interface mocking is essential in web development, and details Huajiao's comprehensive Mock solution—including a SpringBoot‑based backend, MySQL data storage, Nginx redirection, and Lua scripts for dynamic request routing—providing step‑by‑step usage instructions and code examples.
MockMySQLWeb API
0 likes · 13 min read

DroidAssist, an open‑source, configuration‑driven framework from Didi, lets developers replace or augment Android Java bytecode at compile time via simple XML rules—enabling non‑intrusive mocking such as swapping SharedPreferences implementations without source changes or extra dependencies, while supporting incremental builds and rich transformation capabilities.
AOPAndroidDroidAssist
0 likes · 8 min read


转转QAJan 16, 2019 · Frontend Development
This article introduces the Fiddler Mock Interface plugin, explains its background for API mocking during testing, details its one‑click features, UI additions, right‑click menu actions, color‑coded status indicators, and provides a step‑by‑step demonstration of mocking JSONP interfaces for front‑end developers.
APIFiddlerMock
0 likes · 6 min read


JD TechAug 30, 2018 · Frontend Development
Whistle is a Node.js‑based cross‑platform web debugging proxy that lets developers view and modify HTTP(S) and WebSocket traffic, offering features like host binding, request replacement, response status manipulation, script/style injection, and powerful mock data generation for front‑end development.
HTTPMockNode
0 likes · 9 min read

This article explains what the Python Mock library does, how to install and import it, demonstrates basic and advanced usage including creating mock objects, setting return values and side effects, and shows how to apply patch and patch.object for effective unit testing without a real server.
Mockpatchunit-testing
0 likes · 12 min read

The article introduces Qunit, an API automation testing framework built on JUnit, explains its zero‑intrusion Java Agent aspect for mocking third‑party services, and describes a distributed execution platform that creates isolated environments to run tests in parallel, dramatically reducing overall test execution time.
API testingDistributed TestingJava
0 likes · 11 min read

This article examines the challenges of testing a mobile advertising SDK—such as missing server environments, extensive protocol fields, and costly manual test case updates—and proposes a mock‑proxy strategy, a minimal‑case design approach, and full automation to improve coverage and efficiency.
MockProxySDK
0 likes · 5 min read

This article explains the fundamentals of unit testing, compares it with integration testing and TDD, describes characteristics of good unit tests, shows a practical .NET example using XUnit, FluentAssertions and Moq, and offers architectural tips for writing test‑friendly code.
Continuous IntegrationMockcode testability
0 likes · 15 min read
