Adding ATS Service Test from Using EM CLI

This use case describes how you can customize an existing ATS Service Test instance, available in the Test Repository, using custom databank.

Note:

Ensure that you have uploaded an ATS Service Test type to the Test Repository before proceeding with this procedure. For more information on this, see Configuring and Using Services chapter of the Oracle Enterprise Manager Cloud Control Administrator's Guide.

To create an ATS Test instance using the service test available in the repository, and to customize the test by applying a custom databank, follow these steps:

  1. Create an ATS Service Test instance called my_service for the existing service:
    emcli apply_template_tests -targetName='my_service' -targetType=generic_service -input_file=template:'my_template.xml'  -swlibPath='/service/test/entity'
    
    Where,
    -input_file=template:'my_template.xml' contains all the ATS test related information.
    -swlibPath: holds the path to retrieve the ATS Zip file from software library.
    
    Here is an example for a sample input file:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <transaction-template template_type="generic_service" xmlns="template">
       <variables/>
       <transactions>
          <mgmt_bcn_transaction>
             <mgmt_bcn_txn_with_props>
                <mgmt_bcn_txn is_representative="true" name="ats91_with_databanks" monitoring="true" txn_type="OATS"/>
                <properties>
                   <property name="Collection Interval" num_value="5.0" prop_type="2" encrypt="false"/>
                   <property name="scriptDescription" string_value="[1] Oracle Secure Enterprise Search&#xA;[2] Oracle Secure Enterprise Search&#xA;[3] No Title&#xA;[4] No Title" prop_type="1" encrypt="false"/>
                   <property name="fileUploadTime" string_value="2010-09-10 13:49:46.0" prop_type="1" encrypt="false"/>
                   <property name="OpenScriptJwgName" string_value="ats91_with_databanks.zip" prop_type="1" encrypt="false"/>
                   <property name="thinkTimeMaxSec" num_value="5.0" prop_type="2" encrypt="false"/>
                   <property name="usageOptions" string_value="userDefined" prop_type="1" encrypt="false"/>
                   <property name="thinkTimeOption" num_value="1.0" prop_type="2" encrypt="false"/>
                   <property name="fileSize" string_value="93699" prop_type="1" encrypt="false"/>
                   <property name="beaconDistributionOverride" string_value="people=1;middle=1" prop_type="1" encrypt="false"/>
                   <property name="FilePropertyValue" prop_type="7" encrypt="false"/>
                   <property name="databankFilesJar" prop_type="7" encrypt="false"/>
                   <property name="databankFiles" string_value="people,people.csv,3;middle,middle.csv,3;" prop_type="1" encrypt="false"/>
                   <property name="granularity" string_value="transaction" prop_type="1" encrypt="false"/>
                   <property name="thinkTimeMinSec" num_value="0.0" prop_type="2" encrypt="false"/>
                   <property name="oatsVersion" string_value="9.1.0" prop_type="1" encrypt="false"/>
                   <property name="databankValues" string_value="people.firstname=yang.,people.lastName=wang,middle.middlename_col=x." prop_type="1" encrypt="false"/>
                   <property name="modules" string_value="oracle.oats.scripting.modules.utilities;version=2.4.0&#xA;oracle.oats.scripting.modules.http;version=2.4.0&#xA;oracle.oats.scripting.modules.basic;version=2.4.0" prop_type="1" encrypt="false"/>
                   <property name="databankAliasMapping" string_value="middle=middle.csv,people=people.csv" prop_type="1" encrypt="false"/>
                </properties>
                <per_bcn_properties/>
             </mgmt_bcn_txn_with_props>
             <steps_defn_with_props/>
             <stepgroups_defn/>
             <txn_thresholds/>
             <step_thresholds/>
             <stepgroup_thresholds/>
          </mgmt_bcn_transaction>
       </transactions>
    </transaction-template>
    
  2. Upload new databank file called ATSTest1 to ATS test type for the service my_service:
    emcli upload_ats_test_databank_file  -name='my_service' -type='generic_service' -testname='ATSTest1' -testtype='OATS'  -databankAlias='alias1' -input_file='databank:databankFile.csv'
    Where,
    -input_file=databank: contains the databank file path
    
  3. Enable the test ATSTest1 for the service my_service:
    emcli enable_test -name="my_service" -type="generic_service"   -testname="ATSTest1" -testtype="OATS"