FlowTest (ベータ)
親種別
Metadata メタデータ型を拡張し、その fullName 項目を継承します。
ファイルのサフィックスおよびディレクトリの場所
FlowTest コンポーネントのサフィックスは .flowtest で、flowtests フォルダに保存されます。
バージョン
FlowTest コンポーネントは、API バージョン 55.0 以降で使用できます。
特別なアクセスルール
この種別に固有のアクセス要件は他にありません。
項目
| 項目名 | 説明 |
|---|---|
| description |
|
| flowApiName |
|
| label |
|
| testPoints |
|
FlowTestPoint
フローテストの実行時に評価されるフローテストポイントを定義します。各テストポイントは、リストの順序で評価されます。
| 項目名 | 説明 |
|---|---|
| assertions |
|
| elementApiName |
|
| parameters |
|
FlowTestAssertion
フローテストの実行時に評価されるテストポイントのアサーションを定義します。1 つのアサーションが false に評価されると、テスト実行は失敗します。
| 項目名 | 説明 |
|---|---|
| conditions |
|
| errorMessage |
|
FlowTestCondition
フローテストの実行時に評価されるアサーションの条件を定義します。1 つの条件が false に評価されると、アサーションは失敗します。
| 項目名 | 説明 |
|---|---|
| leftValueReference |
|
| operator |
|
| rightValue |
|
FlowTestReferenceOrValue
演算子によってフローテストアサーションおよび条件のリソースの参照に適用される特定の値を定義します。
| 項目名 | 説明 |
|---|---|
| booleanValue |
|
| dateTimeValue |
|
| dateValue |
|
| numberValue |
|
| sobjectValue |
|
| stringValue |
|
FlowTestParameter
開始テストポイントのトリガレコードのパラメータを定義します。
| 項目名 | 説明 |
|---|---|
| leftValueReference |
|
| type |
|
| value |
|
宣言的なメタデータの定義のサンプル
FlowTest コンポーネントの例を次に示します。
1<?xml version="1.0" encoding="UTF-8"?>
2<FlowTest xmlns="http://soap.sforce.com/2006/04/metadata">
3 <flowApiName>Example_Test</flowApiName>
4 <label>Test Two</label>
5 <testPoints>
6 <elementApiName>Start</elementApiName>
7 <parameters>
8 <leftValueReference>$Record</leftValueReference>
9 <type>InputTriggeringRecordInitial</type>
10 <value>
11 <sobjectValue>{"AnnualRevenue":100000,"BillingCity":"New York","BillingCountry":"USA","BillingPostalCode":"31349","BillingState":"NY","BillingStreet":"10 Main Rd.","Fax":"(212) 555-5555","Industry":"Apparel","Name":"Acme","NumberOfEmployees":682,"OwnerId":"005RM000001ryMIYAY","Phone":"(212) 555-5555","ShippingCity":"New York","ShippingCountry":"USA","ShippingPostalCode":"31349","ShippingState":"NY","ShippingStreet":"10 Main Rd.","Type":"Prospect"}</sobjectValue>
12 </value>
13 </parameters>
14 <parameters>
15 <leftValueReference>$Record</leftValueReference>
16 <type>InputTriggeringRecordUpdated</type>
17 <value>
18 <sobjectValue>{"AnnualRevenue":100000,"BillingCity":"New York","BillingCountry":"USA","BillingPostalCode":"31349","BillingState":"NY","BillingStreet":"10 Main Rd.","Fax":"(212) 555-5555","Industry":"Apparel","Name":"Acme","NumberOfEmployees":682,"OwnerId":"005RM000001ryMIYAY","Phone":"(212) 555-5555","ShippingCity":"New York","ShippingCountry":"USA","ShippingPostalCode":"31349","ShippingState":"NY","ShippingStreet":"10 Main Rd.","Type":"Other"}</sobjectValue>
19 </value>
20 </parameters>
21 </testPoints>
22 <testPoints>
23 <assertions>
24 <conditions>
25 <leftValueReference>$Record.Industry</leftValueReference>
26 <operator>EqualTo</operator>
27 <rightValue>
28 <stringValue>Other</stringValue>
29 </rightValue>
30 </conditions>
31 <errorMessage>Industry was not set.</errorMessage>
32 </assertions>
33 <elementApiName>Finish</elementApiName>
34 </testPoints>
35</FlowTest>前の定義を参照する package.xml の例を次に示します。
1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3<types>
4<members>Test_Two</members>
5<name>FlowTest</name>
6</types>
7<version>55.0</version>
8</Package>マニフェストファイル内のワイルドカードのサポート
このメタデータ型では、package.xml マニフェストファイル内のワイルドカード文字 * (アスタリスク) がサポートされます。マニフェストファイルの使用についての詳細は、「zip ファイルを使用したメタデータのリリースと取得」を参照してください。