Test Websocket Endpoints via the Websocket Console¶
Choreo provides an integrated WebSocket Console to test publicly exposed WebSocket endpoints of Service components you create and deploy. The WebSocket Console allows you to connect to your service and interactively exchange messages. By default, Choreo secures WebSocket APIs with OAuth 2.0, and the console automatically generates test keys for authenticated API testing.
Follow these steps to test a WebSocket endpoint using the WebSocket Console:
- Go to the Choreo Console and log in.
- In the Component Listing pane, click on the component you want to test.
- Click Test in the left navigation menu, then select Console. This opens the WebSocket Console pane.
- In the WebSocket Console pane, select the desired environment from the drop-down list.
-
Choose the endpoint you want to test from the Endpoint list.
Note
- The Network Visibility of an endpoint is configured in the endpoints.yaml file. You can set it to Public, Organization, or Project.
- If the Network Visibility is set to Public, proceed to step 7.
- If the Network Visibility is set to Organization, the endpoint won't be accessible outside the organization. For testing, Choreo allows you to generate a temporary URL that remains active for 15 minutes. Follow step 6 to generate the URL.
-
Generate a temporary URL (if applicable): If the Network Visibility is set to Organization, click Generate URL to create a temporary test URL valid for 15 minutes. Otherwise, skip this step.
Note
The temporary test URL is valid for 15 minutes and will expire afterward. To manually deactivate it, click Deactivate URL.
-
Expand the channel you want to test.
- Click Connect to establish a connection. The connection status will be displayed in the output logs.
-
Send and receive messages: Interact with the deployed service by sending and receiving messages.
Note
The maximum connection duration is 15 minutes. After that, the connection terminates. To reconnect, click Connect again.