Version History:
Version# | Date | Modified By | Description of Modification |
---|---|---|---|
1.0 | 2/10/2016 | Sailaja Adusumilli | Initial Version |
AuditQuery Test Details:
Overview:
AuditQueryLog Service project is used to test audit search functionality for each service. It is accomplished by passing required query parameters to audit query service and by validating query results. Testing will be done in standard and pass through mode with Database logging turned on. CONNECT by default uses Database logging and Log4j logging will be turned off. This project have five test suites and each test suite consists of QueryAuditEvents service with different services. Test case description and what it does are described below:
QueryAuditEvents TestCase: This test case is used to test audit query based on the request type elements that are passed in auditquery service. This means, auditquery service request has UserId, EventTypeList, EventOutcomeIndicator, EventBeginDate and RemoteHcidList element values. When this suite is executed, an on script will insert required data into the auditrepo.auditrepository table and then audit search performed based on the elements that are passed in request. Returned results are verified using assertion checks.
QueryAuditEventsBlob TestCase: This test case is used to test audit query based on blob request type element that is passed in SoapUI request. When this suite is executed, an on script will insert required data into the auditrepo.auditrepository table and then audit search performed based on auditId that is passed in request. Returned results are verified using assertion checks.
QueryAuditEventsEmptyBlob TestCase: This test case is used to test audit query's empty blob response message. When this suite is executed, an on script will insert required data into the auditrepo.auditrepository table and then audit search performed based on auditId that is passed in request. If there is no matching auditId in auditrepo.auditrepository table, then audit query service returns an empty response. Returned results are verified using assertion checks.
QueryAuditEventsByMessageID TestCase: This test case is used to test audit query based on messageId element that is passed in SoapUI request. When this suite is executed, an on script will insert required data into the auditrepo.auditrepository table and then audit search performed based on messageId that is passed in request. If there are no matching messageId in auditrepo.auditrepository table, then audit query service returns an empty response. Returned results are verified using assertion checks.
QueryAuditEventsByMessageID&RelatesTo TestCase: This test case is used to test audit query based on messageId and relatesTo elements that are passed in SoapUI request. When this suite is executed, an on script will insert required data into the auditrepo.auditrepository table and then audit search performed based on elements that are passed in request. If there is no matching messageId & relatesTo entry in auditrepo.auditrepository table, then audit query service returns an empty response. Returned results are verified using assertion checks.
Preparation & Execution:
- Deploy CONNECT ear (mvn clean install -P AD,PD,DQ,DR,DS,X12)
- In audit.properties, make sure LogToDatabase=true, LogToFile=false and other services are true (ex: QueryForDocuments=true)
- In AuditRepositoryProxyConfig.xml make sure to have securedImplementation are javaImplementation.
- Make sure to have auditquerylog entry in \\nhin\properties\ InternalConnectionInfo.xml file.
- In SoapUI, load ValidateAuditQueryLogService project and execute.
- Make sure all five suites are passed and green.
- Test in Standard, Passthrough mode.
Audit Logging Test Details:
AuditLogging via Database Test:
AuditLogging-Standard, AuditLogging-Passthrough projects are used to test audit logging functionality. It is accomplished by querying audit entries from auditrepo.auditrepository table and by adding assertion checks on blob elements and(or) attributes for each service. Testing should be done in Standard and Passthrough modes. By using audit.properties file auditing can be turned on/ off for any service (except AD) and for any specific transaction. CONNECT by default uses Database logging and Log4j logging will be turned off. AuditLogging-Standard, AuditLogging-Passthrough projects are implemented using CONNECT's default logging. These projects also verifies Database audit off functionality for all services (except AD). Further details on each project are described below:
AuditLogging-Standard: This project is used to test CONNECT's audit logging functionality for PD,DQ,DR,DS,PDDeferred and DSDeferred services. This project got g0, g1 suites with one test case for each service. When this project is executed, there is an on script for each test case which validates number of audit entries logged in auditrepo.auditrepository table. The script will also fetch and validate the blob message to make sure it is complying as per sequoia project checklist and Exchange spec. When auditing turned off using an on script, it is verified that there are no entires in auditrepo.auditrepository table.
AuditLogging-Passthrough: This project is used to test CONNECT's audit logging functionality for PD,DQ,DR,DS,X12, PDDeferred ,DSDeferred, Batchrequest and Batchresponse services. This project got g0, g1 suites with one test case for each service. When this project is executed, there is a script for each test case which validates number of audit entries logged in auditrepo.auditrepository table. The script will also fetch and validate the blob message to make sure it is complying as per sequoia project checklist and Exchange spec. Using an on script, when auditing turned off, it is verified that there are no entires in auditrepo.auditrepository table.
Preparation & Execution:
- Deploy CONNECT ear (mvn clean install -P AD,PD,DQ,DR,DS,X12)
- In audit.properties, make sure LogToDatabase=true, LogToFile=false and other services are true (ex: QueryForDocuments=true)
- In AuditRepositoryProxyConfig.xml make sure to have securedImplementation are javaImplementation.
- In SoapUI, load AuditLogging-Standard / AuditLogging-Passthrough project and execute.
- Make sure all test cases for g1, g0 are passed and green.
- Test in Standard, Passthrough mode. ( Note: While testing in Passthrough mode make sure to enable Passthrough mode for service in gateway.properties)
AuditLogging via Log4j File Test:
AuditLogging using Log4j file functionality is tested by running a CONNECT-ValidationSuite. It is accomplished by turning Log4j file logging property "LogToFile" to true. Testing should be done in Standard and Passthrough modes. By using audit.properties log4j file auditing can be turned on/off for any service (except AD) and for any specific transaction without requiring a database. When Log4j - LogToFile property turned on, it will log complete ATNA audit message, with timestamp in a separate file that is configured in Log4j.properties using "log4j.appender.AUDIT.File" property.
Preparation & Execution:
- Deploy CONNECT ear (mvn clean install -P AD,PD,DQ,DR,DS,X12)
- In audit.properties, make sure LogToDatabase=false, LogToFile=true and other services are true (ex: RetrieveDocuments=true)
- In AuditRepositoryProxyConfig.xml make sure to have securedImplementation are javaImplementation.
- In SoapUI, load CONNECT-ValidationSuite project and execute.
- Make sure all test cases for g1, g0 are passed and green.
- Verify audit messages are logged in audit.log file. ( default audit.log will be present under //logs/Audit.log).
- Test in Standard, Passthrough mode. ( Note: While testing in Passthrough mode make sure to enable Passthrough mode for service in gateway.properties)
AuditLogging via Log4j File and Database Test:
AuditLogging functionality is tested by using Log4j and Database configuration. It is accomplished by turning Log4j file logging property "LogToFile" to true and "LogToDatabase" to true. Testing should be done in Standard and Passthrough modes. Auditing can be turned on/off for any service (except AD) and for any specific transaction. When "LogToFile" and "LogToDatabase" properties turned on, it will log complete ATNA audit message, with timestamp in database as well in the file that is configured in Log4j.properties using "log4j.appender.AUDIT.file" property.
Preparation & Execution:
- Deploy CONNECT ear (mvn clean install -P AD,PD,DQ,DR,DS,X12)
- In audit.properties, make sure LogToDatabase=true, LogToFile=true and other services are true (ex: RetrieveDocuments=true)
- In AuditRepositoryProxyConfig.xml make sure to have securedImplementation are javaImplementation.
- In SoapUI, load CONNECT-ValidationSuite project and execute.
- Make sure all test cases for g1, g0 are passed and green.
- Verify audit messages are logged in audit.log file. ( default audit.log will be present under //logs/Audit.log).
- Verify audit messages are logged in database as well.
- Test in Standard, Passthrough mode. ( Note: While testing in Passthrough mode make sure to enable Passthrough mode for service in gateway.properties)