Tagged articles
api-testing
17 articles · Page 1 of 1
This guide explains how to correctly use params, json, data, and files in Python's requests library for GET, POST/PUT, and multipart requests, highlighting common pitfalls, debugging tips, and when to choose each method to avoid typical API errors.
File UploadPythonapi-testing
0 likes · 6 min read

This guide demonstrates how to create a reusable Python testing framework that encapsulates generic API response assertions, database query utilities, supports chainable calls, logging, exception handling, and integrates seamlessly with pytest or unittest, including installation steps, project structure, core code examples, and execution instructions.
Pythonapi-testingassertions
0 likes · 7 min read

This article demonstrates how to encapsulate logging within the Pytest framework by creating daily log files, applying color-coded log levels, configuring flexible output formats, and providing a reusable ApiLog class for streamlined logging in API automation tests.
ColorLogLoggingPython
0 likes · 5 min read

This article demonstrates how to use Python's requests library to perform chained API calls—login, create user, retrieve user details, and update user information—while handling exceptions, logging, and environment configuration for robust automated testing.
BackendPythonapi-testing
0 likes · 7 min read

This article explains Python generator functions, their memory‑efficient iteration mechanism, and demonstrates through multiple examples—including basic generators, Fibonacci sequences, large file processing, HTTP streaming, and API test data generation—how they can streamline and optimize interface automation testing workflows.
api-testingautomationgenerator
0 likes · 10 min read

This article introduces Python decorators—such as retry, timeout, logging, caching, response validation, parameterization, exception handling, performance monitoring, permission checking, and composite usage—and provides complete code examples showing how they simplify and strengthen automated API testing.
CachingDecoratorLogging
0 likes · 10 min read

This article presents ten practical Python decorator patterns—such as logging, performance measurement, exception handling, retry, status‑code validation, parameter checking, rate limiting, data‑driven testing, environment configuration, and concurrent execution—each illustrated with clear use‑case descriptions and complete code snippets for API testing.
ConcurrencyDecoratorLogging
0 likes · 9 min read

This article presents ten practical strategies for improving efficiency, maintainability, and reusability in Python API automation testing, covering session reuse, parameterization, mocking, exception handling, fixtures, concurrency, data‑driven tests, response validation, conditional execution, and scheduled test runs.
api-testingpytestrequests
0 likes · 8 min read

This article demonstrates how Python generator functions can be applied in API automation testing to process large data streams, batch requests, infinite sequences, file handling, dynamic test data generation, recursive file traversal, lazy calculations, data filtering, response processing, retry logic, and test report creation, thereby improving memory efficiency and test flexibility.
api-testinggeneratormemory-management
0 likes · 6 min read

This article demonstrates how to leverage pytest fixtures to manage resources such as authentication tokens, database connections, temporary directories, API clients, environment variables, services, configuration files, caches, user roles, and HTTP headers, providing reusable and maintainable test code examples.
api-testingfixturespytest
0 likes · 6 min read

This tutorial explains how to install the requests_toolbelt library and use its MultipartEncoder to upload single or multiple files via multipart/form-data in Python, including code examples and important header settings for API testing.
api-testingfile-uploadmultipart
0 likes · 3 min read

This article presents ten practical Python automation testing scripts—including batch test execution, data‑driven testing, API monitoring, performance measurement, database checks, screenshot capture, email reporting, data generation, logging, and response validation—to help developers streamline API testing and improve efficiency.
Automation TestingData GenerationLogging
0 likes · 7 min read

This article explains how to leverage Python's requests library for sending HTTP requests and xlwt for exporting test results to Excel, providing a complete example of an API automation testing framework that reads test cases from Excel, runs them with unittest, and generates a report.
api-testingunittestxlwt
0 likes · 9 min read

The article introduces a straight‑line (linear) code‑style Java framework for building and executing HTTP API requests, explains its design, provides the full source code, and demonstrates usage with a concise example illustrating GET/POST handling, headers, cookies, and response parsing.
BackendCode styleapi-testing
0 likes · 7 min read

This guide demonstrates how to quickly build Python-based HTTP/HTTPS API automation test scripts using requests for sending requests, pandas for handling test case data, and openpyxl for exporting results to Excel, covering request construction, response handling, data comparison, and result styling.
Pandasapi-testingopenpyxl
0 likes · 7 min read

The article explains how to extend the JUnit4 framework to create a customizable API automation testing solution by detailing its architecture, data‑driven design with Excel, HTTP request handling, scheduler implementation, and result verification and reporting for efficient regression testing.
Javaapi-testingdata-driven
0 likes · 9 min read


转转QAFeb 6, 2017 · Backend Development
This article explains how to encapsulate Java HttpClient calls for GET and POST HTTP requests, provides utility methods for JSON response parsing, and demonstrates their use in automated API testing, offering a reusable backend solution for developers.
BackendHttpClientJava
0 likes · 7 min read
