This topic explains how to create, run, and review the results of policy enforcement tests.
Creating Policy Enforcement Tests
Once the policy has been defined, policy enforcement tests can be created within SOAtest to reference the related rules or assertions. From the SOAtest test creation wizard, you can create the following types of policy enforcement tests:
- WSDL: Used to enforce policies and standards on the content of your WSDL documents including all imported WSDLs.
- Schema: Used to enforce policies and standards on schemas referenced within your WSDL file including all imported schemas.
- SOAP: Used to enforce policies and standards on SOAP messages sent from your web service.
To reference a policy configuration when creating tests from the WSDL test creation wizard (described in detail in Creating Tests From a WSDL):
- Start completing the wizard as normal.
- If you would like to create WSDL/Schema policy enforcement tests, select the Create tests to validate and enforce policies on the WSDL check box on the first wizard page.
- When you reach the Policy Enforcement wizard page, select the Apply Policy Configuration check box. This will create WSDL and functional tests that will enforce the assertions defined in the specified policy configuration.
- Enter or browse to the desired policy configuration file.
- You can reference a local file or a file on Team Server.
- If you do not have a custom policy configuration, you can use the default policy enforcement tests that reference the default rules sets included with SOAtest. The default policy configuration, default.soapolicy, is a collection of industry-wide best practices.
- Click the Finish button.
Running Policy Enforcement Tests
You can now execute the test by clicking the Test toolbar button:
Any policy violations detected will be reported as tasks in the Quality Tasks view as described in the Reviewing Results.
Alternatively, you can run the test from the command line, then import results into the SOAtest GUI as described in the Importing Results into the UI.
Once the policy enforcement tests have been run, a report can be generated in HTML or XML format which will contain all the error messages for each policy enforcement violation. To view a report, right-click the desired error message and select View Report> Detailed/Summary/Structure from the shortcut menu. The report will display in a Web browser.