Test a portal-based app
Testing a portal application involves validating application headers, validating policy and overall testing.
Testing using header and policy simulation allows you to validate header fields and policy execution if required.
Complete testing should always be performed to validate that the application is behaving as expected for all URIs.
Topics
- Configure application for simulation testing: Configure the application for either header or policy simulation testing.
- Configure Access Gateway for debug and monitoring: Optionally configure Access Gateway to generate and display debug statements.
- Simulation testing: Perform header or policy simulation testing.
- Completed application testing: Perform normal application testing using production URLs.
- Disable Debug: Disable debug after testing.
Configure application for simulation testing
To configure an application for header or simulation testing:
To configure an application for policy simulation testing:
- 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 tab.
- Note the current value of Protected Web Resource.
- Change the Protected Web Resource field to:
Value Behavior http://header.service.spgw When running a test, this displays information about the header, cookie, session, and other information. http://policy.service.spgw When running a test, this displays information about the application policy. Copy and save the original back-end Protected Web Resource value.
- Clear the Customize checkbox to disable the post-login URL.
- Expand the Advanced tab.
- Enable Debug mode.
When enabling Debug mode, ensure that the download log has also been set to level debug. Application debug events aren't visible in downloadable logs unless download logs are also configured to emit Debug level log events. See Manage log verbosity
- 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.
Configure Access Gateway for debug and monitoring
You can optionally configure Access Gateway Management console to output a running display of all system log messages.
To enable this debugging mode and monitor Access Gateway:
- Open a terminal and use SSH to connect to the Access Gateway Management console (ssh oag-mgmt@gw-admin.<domain.tld>).
- Enter 4 - Monitoring.
- Enter 2 - Enable Debug.
- Enter 1 - Monitor logs. This starts the running display of all log messages.
Return to the Access Gateway Admin UI console console. You can test your application and examine the results in the running logs. Use[ctrl][c] to exit the log display.
See Monitor for more details about monitoring, including a list of available commands.
The debug logging level rapidly generates log messages. Always disable debug logging when you've finished examining the logs.
Not disabling debug logging can lead to rapid log file growth, which can result in errors due to lack of storage space.
Simulation testing
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 .
- 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
Completed application testing as required.
- The Applications tab, on the row containing the application, click .
- Repeat testing using .
- Repeat testing using each specialized policy URI.
- If required, disable debugging.
Disable debug
If displaying debug statements at the command line:
- Return to the Access Gateway Management console.
- Enter [ctrl][c] to exit the log display.
- Enter 3 - Disable debug.
- Exit the command line console
If application debug is enabled:
- 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.