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 exchange messages interactively. Choreo secures WebSocket APIs with OAuth2.0 by default, and the console automatically generates test keys for authenticated API testing.
Follow the steps below to test a WebSocket endpoint via the WebSocket Console:
-
Sign in to the Choreo Console.
-
In the Component Listing pane, click on the component you want to test.
-
Click Test in the left navigation menu and then click Console. This opens the WebSocket Console pane.
-
In the WebSocket Console pane, select the environment from the drop-down list.
-
Select the required endpoint from the Endpoint list.
Note
- The Network Visibility of an endpoint is set in the endpoints.yaml file. You can set it to Public, Organization, or Project.
- If you have set the Network Visibility of the endpoint to Public, proceed to step 7.
- If you have set the Network Visibility of the endpoint to Organization, it won't be accessible from 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.
-
If the Network Visibility of the endpoint is set to Organization, click Generate URL to generate 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 after that. If you want 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 to and from the deployed service.
Note
The maximum connection duration is 15 minutes. After that, the connection terminates. To reconnect, click Connect again.