Test a web socket based application
Testing a web socket application involves validating application headers, validating web socket URIs and and overall testing.
Testing using header simulation allows you to validate header fields if required.
Complete testing should always be performed to validate that the application is behaving as expected for all URIs.
- Configure application for simulation testing - Configure the application for either header simulation testing.
- Simulation testing - Perform header or policy simulation testing.
- Completed application testing - Perform normal application testing using production URLs.
- Disable Debug - Disable debug after testing.
This section covers testing using header based simulation and is only required if testing passing of values using application headers.
To configure an application for
- Navigate to the Access Gateway Admin UI console
- From the Topology tab or the Applications tab, open the application.
- Select the Settings pane.
- Expand the Essentials sub tab.
- Note the current value of Protected Web Resource.
- Change the Protected Web Resource field to:
Value Behavior https://header.service.spgw When running a test, results in the display of information related to the header, cookie, session, and other information.
Copy and save the original back end Protected Web Resource value.
- Expand the Advanced sub-tab.
- Set the Debug toggle to Enable.
- Click Done.
When debugging header based applications: Consider testing attributes with static known good values. For example, change dynamic IDP based fields to static with known good values.
When debugging policy based applications: Test with no policy or open policy first.
Header and policy simulation testing involves temporarily replacing the Protected Web resource field in an application and then testing various target URLs, evaluating whether the headers and policies return the expected result.
To test an application using header or policy simulation:
- Configure the application for header or policy simulation testing as described in the Configure application for simulation testing section.
- Connect to the Access Gateway Management console and begin monitoring.
For details see the monitoring section in Troubleshooting Applications.
- Select the Applications tab.
- On the row containing the application, click Goto application > SP Initiated.
- Examine the header or policy information returned.
- Repeat for each protected URI.
- When complete disable debugging as described in the Disable debug section.
Completed application testing as required.
- Return to the application.
- Return the Projected Web Resource to its original production value and save changes.
- The Applications tab, on the row containing the application, click Goto application > SP Initiated.
- Repeat testing using Goto application > IDP Initiated.
- Repeat testing using each specialized policy URI.
- If required, disable debugging.
- Return to the Access Gateway Management console.
- Enter [ctrl][c] to exit the log display.
- Enter 3 - Disable debug.
- Exit the command line console
- Return to the Access Gateway Admin UI console
- Navigate to the application being tested
- Expand the Setting sub tab.
- Expand the Essentials sub tab.
- Return the Protected Web Resource field back to its original value.
- Expand the Advanced sub tab.
- Set the Debug toggle to Disable.
- Save your changes.