跳到內容

資料格式

四個節點,全都照同一套模型打造:一個 parse 或 stringify 操作、一個 value 輸入、一個 result 輸出。

輸入value
輸出result
設定op:parse 或 stringify;indent(0 = 精簡,最多 10)
輸入value
輸出result
設定op、indent(最多 10)

產生的物件會把屬性放在 @_ 前綴底下:<client id="42"/> 會得到 { client: { '@_id': '42' } }。

要用比純文字更好的方式處理 SOAP 回應,靠的就是 這個。

輸入value
輸出result
設定op、indent(1 到 10,預設 2)
輸入value、delimiter(字串)
輸出result
設定op、delimiter(預設 ,)、header(預設 true)

啟用 header 時,parse 會產生一份以第一列為名稱的物件清單。搭配 Read file 和 ForEach,就是資料驅動測試的標準模 式:

Read file「jeux.csv」──► CSV (parse) ──► ForEach
└─ each ──► HTTP 請求