Skip to content

docs: add ssePort, protocol config, and port mapping documentation#806

Open
officialasishkumar wants to merge 2 commits intomainfrom
feat/sse-port-config
Open

docs: add ssePort, protocol config, and port mapping documentation#806
officialasishkumar wants to merge 2 commits intomainfrom
feat/sse-port-config

Conversation

@officialasishkumar
Copy link
Member

What has changed?

This pull request updates the documentation for the Keploy configuration file to clarify and extend how port and host overrides are handled during test replay. It introduces new configuration options for protocol-specific port overrides, documents the new ssePort field, and revises the target resolution order for improved clarity and flexibility.

Configuration options and protocol-specific overrides:

  • Added support for protocol-specific port overrides via a new protocol section in the test configuration, allowing users to specify custom ports for http, sse, and grpc protocols. This makes it easier to add new protocols in the future without code changes. (versioned_docs/version-4.0.0/running-keploy/configuration-file.md) [1] [2]
  • Documented the new ssePort field, which allows users to set a custom port for SSE (Server-Sent Events) test cases. This field overrides the general HTTP port for SSE requests. (versioned_docs/version-4.0.0/running-keploy/configuration-file.md) [1] [2]

Replay target resolution and replaceWith enhancements:

  • Updated and clarified the replay target resolution order to reflect the new protocol-specific override logic and to show the priority of each override step. (versioned_docs/version-4.0.0/running-keploy/configuration-file.md)
  • Enhanced the replaceWith feature to support port-to-port mappings in addition to URL/gRPC authority replacements, and documented how these mappings are applied last as the highest-priority override. (versioned_docs/version-4.0.0/running-keploy/configuration-file.md) [1] [2]

Documentation improvements:

  • Provided detailed YAML examples and clarified the documentation to make it easier for users to understand how to configure and prioritize host and port overrides for different protocols and test sets. (versioned_docs/version-4.0.0/running-keploy/configuration-file.md)

This PR Resolves keploy/keploy#3974

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).
  • Documentation update (if none of the other choices apply).

How Has This Been Tested?

Please run npm run build and npm run serve to check if the changes are working as expected. Please include screenshots of the output of both the commands. Add screenshots/gif of the changes if possible.

Checklist:

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.

Document the new ssePort field, extensible protocol-level port
overrides, and replaceWith port mapping. Update the replay target
resolution order to reflect the new priority layers.
Copilot AI review requested due to automatic review settings March 26, 2026 12:33
@kilo-code-bot
Copy link

kilo-code-bot bot commented Mar 26, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Incremental Review (since 3db12a5)

The incremental changes address both previous review comments:

  1. Fixed: Removed the --sse-port CLI flag reference from ssePort documentation (line 238)
  2. Fixed: Corrected the replay target resolution order - replaceWith rules (step 6) now correctly precede host replacement (step 7), with clear conditional language explaining when host is applied

The documentation is now internally consistent:

  • Line 232 states host applies "only when no replaceWith rule matched"
  • Step 7 clarifies this as "If no replaceWith.global.url or replaceWith.test-sets.<testSet>.url rule matches the recorded URL, and test.host is set..."
Files Reviewed (1 file)
  • versioned_docs/version-4.0.0/running-keploy/configuration-file.md - Documentation updates for ssePort and replay target resolution order

Reviewed by claude-4.5-opus-20251124 · 94,993 tokens

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Keploy v4 configuration-file documentation to better explain replay host/port overriding, including new protocol-specific port overrides, an ssePort option, and replaceWith port-to-port mappings, plus a clarified (and expanded) target resolution order.

Changes:

  • Documents new test.ssePort and test.protocol.<protocol>.port options with YAML examples.
  • Extends replaceWith docs to include port mappings in addition to URL / gRPC :authority replacements.
  • Revises the “Replay Target Resolution Order” section to reflect the new override precedence.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Remove CLI flag reference from ssePort description
- Fix Replay Target Resolution Order: swap steps 6 and 7 so
  replaceWith matching comes before test.host fallback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature]: Add SSE port, protocol-level port config, and replaceWith port mapping

2 participants