EntityPolicyEngineTest Test Details:
Overview:
EntityPolicyEngineTest project is used for testing policy engine in the negative testing case for a "Deny" decision for Document Query and Document Retrieve. Positive testing scenarios are tested under happy path tests from other regression suite tests. Testing will be done in standard mode. Test case description and what it does described below:
TestCase Details:
- Document Query: This test case is used to test Document Query functionality for when the service receives a "Deny" result when querying for documents. When this test case is executed, a script will update UDDI connection info from project specific settings to be applied to the application server configuration and HCID endpoints are updated with test data specific to the test. A Mock is set up for policy engine to deny the request, which is stubbed out by the internalExchangeInfo modifications. When the Document Query request is processed, it returns a blank response as the query was denied and should have no results. Using assertions script will verify the response object contains no documents.
- Document Retrieve: This test case is used to test Document Retrieve functionality when the service receives a "Deny" result when retrieving documents. When this test case is executed, a script will update UDDI connection info from project specific settings to be applied to the application server configuration and HCID endpoints are updated with test data specific to the test. A Mock is set up for policy engine to deny the request, which is stubbed out by the internalExchangeInfo modifications. When the Document Retrieve request is processed, it returns a RegistryError saying the service failed policy check. Using assertions script will verify the existence of the RegistryError and verify no documents are present.
Preparation & Execution:
- Make sure to copy CONNECT common properties from \\CONNECT\Product\Production\Common\Properties\src\main\resources to application server properties folder. (If using WildFly 8.2.1 , copy into \\wildfly-8.2.1.Final\modules\system\layers\base\org\connectopensource\configuration\main).
- Make sure to enable Standard mode for DR/DQ service in gateway.properties. Note: By default all services will be in Standard mode in gateway.properties as of CONNECT-4.6 release.
- Restart application server.
- Deploy CONNECT ear (mvn clean install -P AD,PD,DQ,DR,DS).
- In SoapUI, make sure to have GatewayPropDir value set either by using global SOAPUI properties or by setting custom SOAPUI property at the project level.
- In SoapUI, load EntityPolicyEngineTest project and execute.
- Make sure all test cases are passed and green.