KeepAliveHeader

Overview:

KeepAliveHeader project is used for testing custom HTTP headers for CONNECT via the "customHttpHeaders" and "connectionKeepAlive" properties and assertion block elements.

KeepAlive is a generic header to allow the sender to set a minimum timeout (in seconds) that an idle connection can stay open.  A maximum number of requests can also be set before the connection is closed.

Testing will be done in standard mode. 


TestCase Details:

  • KeepAliveNoCustomGatewayProperties: Tests the KeepAlive header functionality by setting "connectionKeepAlive=true" in the start up script. A correlation and HCID mapping is added for DQ for test data. Once the request is processed, the context is checked to ensure that the KeepAlive header was inserted into the request.
  • KeepAliveOneCustomGatewayProperties: Tests the KeepAlive header functionality by setting "connectionKeepAlive=true" in the start up script and adds a custom property "customHttpHeaders.Custom1=correct1" which should be passed along with the requests. A correlation and HCID mapping is added for DQ for test data. Once the request is processed, the context is checked to ensure that the KeepAlive header and custom property was inserted into the request.
  • KeepAliveTwoCustomGatewayProperties: Tests the KeepAlive header functionality by setting "connectionKeepAlive=true" in the start up script and adds two custom properties "customHttpHeaders.Custom1=correct1" and "customHttpHeaders.Custom2=correct2" which should be passed along with the requests. A correlation and HCID mapping is added for DQ for test data. Once the request is processed, the context is checked to ensure that the KeepAlive header and custom property was inserted into the request.
  • KeepAliveNoCustomAssertionBlock: Tests the KeepAlive header functionality by inserting the "keepAlive" element into the SOAP body of the entity request. A correlation and HCID mapping is added for DQ for test data. Once the request is processed, the context is checked to ensure that the KeepAlive header was inserted into the NwHIN request.
  • KeepAliveOneCustomAssertionBlock: Tests the KeepAlive header functionality by inserting the "keepAlive" element into the SOAP body of the entity request as well as custom HTTP headers with the "CONNECTCustomHttpHeaders" element. A correlation and HCID mapping is added for DQ for test data. Once the request is processed, the context is checked to ensure that the KeepAlive header was inserted into the NwHIN request.
  • KeepAliveTwoCustomsAssertionBlock: Tests the KeepAlive header functionality by inserting the "keepAlive" element into the SOAP body of the entity request as well as two custom HTTP headers with the "CONNECTCustomHttpHeaders" element. A correlation and HCID mapping is added for DQ for test data. Once the request is processed, the context is checked to ensure that the KeepAlive header was inserted into the NwHIN request.
  • KeepAliveAssertionBlockOverride: Tests the KeepAlive header functionality in which the SOAP Request elements should take precedence over the values specified gateway.properties file. This test inserts the "keepAlive" element into the SOAP body of the entity request as well as two custom HTTP headers with the "CONNECTCustomHttpHeaders" element. The gateway.properies has the "connectionKeepAlive" property set to "false" - which should be overridden by the SOAP body. A correlation and HCID mapping is added for DQ for test data. Once the request is processed, the context is checked to ensure that the KeepAlive header was inserted into the NwHIN request.
  • CustomHeadersAdapter: Tests the KeepAlive header functionality at the adapter layer (mocked) in which the SOAP Request elements should take precedence over the values specified gateway.properties file. This test inserts the "keepAlive" element into the SOAP body of the entity request as well as two custom HTTP headers with the "CONNECTCustomHttpHeaders" element. The gateway.properies has the "connectionKeepAlive" property set to "false" - which should be overridden by the SOAP body. A correlation and HCID mapping is added for DQ for test data. Once the request is processed, the context is checked to ensure that the KeepAlive header was inserted into the NwHIN request.

Preparation & Execution:

  1. 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).
  2. Make sure to enable Standard mode for DQ services in gateway.properties. Note: By default all services will be in Standard mode in gateway.properties as of CONNECT-4.6 release.
  3. Restart application server.
  4. Deploy CONNECT ear (mvn clean install -P AD,PD,DQ,DR,DS).
  5. 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.
  6. In SoapUI, load KeepAliveHeader project and execute.
  7. Make sure all test cases are passed and green.