Implement integration tests and httpx performance features (keep-alive, pooling, HTTP/2, async) - rebased on main - #13
Conversation
Co-authored-by: nicmostert <142271462+nicmostert@users.noreply.github.com>
Co-authored-by: nicmostert <142271462+nicmostert@users.noreply.github.com>
|
@copilot I think you should also do the implementation of the features that are required by these tests. As in do the "development" part of the "test driven development". |
nicmostert
left a comment
There was a problem hiding this comment.
Looks good. I've added some more instructions as a comment to the issue.
…figurable pooling Co-authored-by: nicmostert <142271462+nicmostert@users.noreply.github.com>
You're absolutely right! I've now implemented the actual "development" part of TDD. The performance tests were expecting features that didn't exist yet: New Features Implemented:
Real Performance Benefits:
The tests now validate actual implementations rather than just testing the testing framework. Both |
|
@copilot okay I just pushed a bunch of changes to main. #15 is no longer happening, I just did a simpler scheme by hand. Don't worry about it, I'm gonna pull this branch, merge the changes, fix the conflicts, then hand it back over to you to integrate this branch throughout. Not sure if I really need to keep you up to speed with all this. Anyway, stand by. |
|
@copilot can you rebase to main before continuing work on this, or do I need to do that? |
I've successfully rebased the branch onto the latest main. The rebase is complete with one conflict resolved in |
This PR implements a comprehensive performance testing framework for HURL and the actual httpx performance features to validate and demonstrate their impact, including connection keep-alive, pooling, HTTP/2, and async concurrency patterns.
Note: This branch has been rebased onto the latest main branch, incorporating all recent testing infrastructure improvements and environment variable handling changes.
Key Features
Three Test Environment Strategies
Performance Test Coverage
Opt-in Testing with CLI Flags
Performance tests are never run by default and require explicit flags:
Quantified Performance Results
The tests provide concrete performance metrics demonstrating httpx feature benefits:
Implementation Details
New Test Files
tests/performance/local_server.py- FastAPI-based test server with fixture servingtests/performance/test_connection_features.py- Connection management tests (7 tests)tests/performance/test_concurrency_features.py- Concurrency and scaling tests (10 tests)tests/performance/test_protocol_features.py- HTTP protocol tests (7 tests)tests/performance/test_timeout_retry.py- Timeout and retry tests (8 tests)New Features Implemented
Enhanced HilltopClient with Performance Features
max_connectionsandmax_keepalive_connectionsparametershttp2=Trueparameterverify_sslparameterNew AsyncHilltopClient for High-Performance Async Operations
httpx.AsyncClientbackendasync with AsyncHilltopClient())Configuration Support
Environment variables control all server behavior:
CI/CD Integration
Rebase Integration
pyproject.toml0c60470to latest maind71af02Bug Fixes
HilltopParseErrorimport inhurl/schemas/responses/status.py<HilltopServer>XML format compatible with response parsersDocumentation
Added comprehensive documentation in
docs/PERFORMANCE_TESTING.mdwith usage examples, configuration options, and troubleshooting guidance. Updated main README with performance testing overview and CLI usage examples.This implementation follows complete TDD principles - tests were written first to drive the development of actual httpx performance features, providing both comprehensive testing infrastructure and production-ready performance enhancements for real-world usage.
Fixes #12.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.