Add test proxy framework for integration testing#446
Open
paddybyers wants to merge 1 commit intouts-integrationfrom
Open
Add test proxy framework for integration testing#446paddybyers wants to merge 1 commit intouts-integrationfrom
paddybyers wants to merge 1 commit intouts-integrationfrom
Conversation
Add a Go-based test proxy that intercepts and manipulates WebSocket and HTTP traffic between SDK clients and the Ably service. Includes: - Programmable proxy server with rule-based request/response manipulation - WebSocket and HTTP proxy handlers with protocol-level inspection - Session management and action framework for fault injection - Integration test specs for connection failures, resume, heartbeats, channel faults, and REST faults using the proxy - Proxy helper spec for UTS integration test authors - Updated write-test-spec skill with proxy test patterns
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
UTS proxy framework for integration tests
This PR extends the UTS work (which contains unit tests with mocked network clients, and some happy-path integration tests) with a proxy that can be used to implement unhappy path tests to exercise client handling of connection problems, protocol errors, refused or failed operations, etc.
This means that it is also possible to specify integration tests similarly in natural language, without mocking the networking clients. Integration tests that verify SDK behaviour in response to non-normal server behaviour can be implemented using this proxy, under control of the test, that intercepts and/or modifies protocol messages. The required behaviour of the proxy in a given test can also be specified in natural language. The integration tests include a proxy written in Go that can be spawned in a test run and controlled by tests via a control API.
See the proposal for details of the proxy behaviour and API.
This PR contains a small number of test specs for tests using this proxy to illustrate how it would be used.