コンテンツにスキップ

did_challenge

次のchallengeに移る前に処理をします。

sleep

指定した時間、待機します。

Config

Definitions

Key Type Description Example Default
min float 待機時間 の下限値 0.1
max float 待機時間 の上限値 1.0

待機時間について

待機時間はminからmaxの範囲でランダムに決定されます。
固定値にしたい場合はminmaxに指定したい値を設定してください。

Examples

ランダムで0.1~1.0秒待機する

yaml did_challenge: - name: sleep config: min: 0.1 max: 1.0

0.5秒待機する

yaml did_challenge: - name: sleep config: min: 0.5 max: 0.5

tag

リクエスト結果ごとにタグを設定します。

Config

Definitions

Root
Key Type Description Example Default
conditions Condition[] タグの値と条件
Condition
Key Type Description Example Default
tag str 付与するタグ tag: {{ trial.one.type }}
when str 条件式
"trial.name == 'hoge'"

tagおよびwhenについて

Template表記に対応しています。
プロパティは以下を使用できます。

key Type Description
trial Trial テスト結果
res_one Response oneのレスポンス情報
res_other Response otherのレスポンス情報
res_one_props (dict) oneのレスポンスプロパティ
res_other_props (dict) otherのレスポンスプロパティ

Examples

Trialのnameがjsonのとき、jsonというタグを付ける

yaml did_challenge: - name: tag config: conditions: - tag: json when: "trial.name == 'json'"

それぞれのレスポンスタイプをタグとして付ける

yaml did_challenge: - name: tag config: conditions: - tag: "tag:{{ trial.one.type }}" - tag: "tag:{{ trial.other.type }}"

oneのレスポンスプロパティitems[0].type の値をタグにつける

yaml did_challenge: - name: tag config: conditions: - tag: "{{ res_one_props.items[0].type }}"