Expand Deployment Plan. Detailed Example Description

E-2 Oracle Fusion Middleware Developers Guide for Oracle Portal You can turn the test page on and off by using the JNDI variable oracleportalproviderprovider_nameshowTestPage to true or false. Once a provider is tested and in service you might want to restrict access to the test page. For more information about retrieving and setting JNDI variables, refer to Section 7.2.4, Using JNDI Variables . E.2 Test Harness The test harness is a command line utility for unit- and performance-testing your providers without accessing an Oracle Portal instance. The test harness sends HTTP requests to the target Web provider and records the responses for further analysis. The responses are logged into an XML file. Performance statistics are logged into another file for analysis. The test harness provides considerable flexibility in the following ways: ■ You create your own test definition. Based on the information in the test definition, the harness sends requests to the provider. The test definition file is in XML format and lists request instances to send to the target Web provider. ■ The information returned by the provider is stored in a standard XML file, which makes it easier to understand and analyze. ■ You can perform load testing of the Web provider. E.2.1 Test Definition File The test definition file is an XML file that lists the request instances for a particular test. You can optionally subdivide the request instances into request groups within the test definition file. You can include the details of the request instances in the test definition file or refer to a request library XML file that defines the instance details. In addition to the request instances, the test definition file also includes information about the host and port of the target Web provider and any pre-processors to which it needs to be sent. A pre-processor enables you to include application-specific logic in the request instances at runtime in the test harness. For example, a pre-processor might check the validity of XML in the SOAP messages being sent to the target Web provider. The test harness provides the following three built-in pre-processors: ■ Oracle Portal pre-processor ■ Validation-based caching pre-processor ■ HMAC Hashed Message Authentication Checksum pre-processor The following sample test definition file illustrates the format and content of the file: ?xml version=1.0 encoding=ISO-8859-1? ?testDefinition version=0.1? testDefinition defaultHostmachine.name.comdefaultHost defaultPort80defaultPort defaultPathjpdkproviderssampledefaultPath property name=portletId value=1 preProcessorDefinitions preProcessor class=oracle.webdb.testharness.preprocessor.PortalPreProcessor nameportalname preProcessor preProcessor class=oracle.webdb.testharness.preprocessor.HMACPreProcessor namehmacname