EM CLIを使用したATSサービス・テストの追加

このユースケースは、カスタム・データバンクを使用して、テスト・リポジトリで使用可能な既存のATSサービス・テスト・インスタンスをカスタマイズする方法を説明します。

ノート:

このプロシージャを続行する前に、ATSサービス・テスト・タイプをテスト・リポジトリにアップロードしていることを確認します。詳細は、『Oracle Enterprise Manager Cloud Control管理者ガイド』「サービスの構成および使用」を参照してください。

リポジトリで使用可能なサービス・テストを使用してATSテスト・インスタンスを作成し、カスタム・データバンクを適用することによりテストをカスタマイズするには、次のステップに従います。

  1. 既存のサービスに対して、my_serviceという名前のATSサービス・テスト・インスタンスを作成します。
    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. ATSTest1という名前の新しいデータバンク・ファイルをサービスmy_serviceのATSテスト・タイプにアップロードします。
    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. サービスmy_serviceに対して、テストATSTest1を有効にします。
    emcli enable_test -name="my_service" -type="generic_service"   -testname="ATSTest1" -testtype="OATS"