コンテンツにスキップ

final

Jumeauxの処理が完了する直前処理を行う事ができます。

summary

結果の概要をテキスト形式で出力します。
出力された項目の定義はreportを参考にしてください。

Config

Definitions

Root
Key Type Description Example Default
sysout (bool) ファイルではなく標準出力を使うか true false

sysout

  • trueでない場合はファイルが作成されます
  • ファイルはconfigのresponse_dirで指定されたディレクトリの中にsummary.txtという名前で作成されます

Examples

結果の概要ファイルを出力する

yaml final: - name: summary

結果の概要を標準出力に出力する

yaml final: - name: summary config: sysout: true

json

結果のレポートをjson形式で出力します。
出力されたjsonの定義はreportを参照してください。

Config

Definitions

Root
Key Type Description Example Default
sysout (bool) ファイルではなく標準出力を使うか true false
indent (int) インデント 2 -

sysout

  • trueでない場合はファイルが作成されます
  • ファイルはconfigのresponse_dirで指定されたディレクトリの中にreport.jsonという名前で作成されます

indent

未指定だと1行で出力されます。

Examples

結果のレポートをjsonファイルで出力する

yaml final: - name: json

結果のレポートをインデントサイズ4で標準出力に出力する

yaml final: - name: json config: sysout: true indent: 4

miroir

Miroir参照用にデータをAWSに登録します。

Config

Definitions

Root
Key Type Description Example Default
table string 転送先DynamoDBのテーブル名 miroir
bucket string 転送先S3のBucket名 mamansoft-miroir
prefix (string) 転送先S3のkey prefix test
cache_max_age (int) S3に転送したレスポンスのキャッシュ生存期間(秒) 3600 0
with_zip (bool) ReportとレスポンスをzipしたファイルをS3に転送するか false true
assumed_role_arn (string) Assumed roleで認証を行う場合はarnを指定する TODO:
checklist (string) 今はまだ使用していません
local_stack LocalStack LocalStackを使用する場合に設定する
endpoints Endpoints DynamoDB/S3のエンドポイントを個別指定する
when (When[]) Miroirへ転送する条件
when
Name Description
not_empty 結果が空ではないとき
has_different 結果にdifferentが存在するとき
  • 全ての条件を満たす場合のみ転送します
  • 未指定の場合は必ず転送します
LocalStack
Key Type Description Example Default
use bool LocalStackを使用するか true
endpoint (string) LocalStackのエンドポイント http://localstack http://localhost
Endpoints
Key Type Description Example Default
dynamodb (string) DynamoDBのエンドポイント http://localhost:3456
s3 (string) S3のエンドポイント http://localhost:3456

Warning

local_stackendpoints は同時に指定できません。

Examples

キャッシュ1時間で保存する

yaml final: - name: miroir config: table: miroir bucket: mamansoft-miroir cache_max_age: 3600

キャッシュなしでprefixを指定して保存する

Bucketのtest/配下にデータが保存されます。

yaml final: - name: miroir config: table: miroir bucket: mamansoft-miroir prefix: test

LocalStackを使ってキャッシュ2分で保存する

yaml final: - name: miroir config: table: miroir bucket: mamansoft-miroir cache_max_age: 120 local_stack: use: true

DynamoDBとS3のendpointを個別指定する

yaml final: - name: miroir config: table: miroir bucket: mamansoft-miroir endpoints: dynamodb: http://localhost:3456 s3: http://localhost:3456

結果が空でないときだけ保存する

yaml final: - name: miroir config: table: miroir bucket: mamansoft-miroir when: - not_empty

notify

実行結果を通知します。

Prerequirements

指定したnotifierのtypeによっては環境変数の設定が必要になります。

Config

Definitions

root
Key Type Description Example Default
notifies (Notify[]) 通知設定
Notify
Key Type Description Example Default
notifier string 使用する通知設定の名前 jumeaux
message string 送信するメッセージ
{{ title }}が完了しました
when str 通知条件式
'summary.status.different > 0'

notifierについて

通知設定の例は config/examples を参考にしてください。定義は notifier の通りです。

messageについて

Template表記に対応しています。
プロパティはReportで定義されたものを使用できます。

whenで指定できるプロパティ

Template表記に対応しています。
プロパティはReportで定義されたものを使用できます。

Examples

紹介する例はjumeauxという名前のnotifierが設定されている必要があります。

設定例

yaml notifiers: jumeaux: type: slack version: 2

通知設定jumeauxを使って終了時通知する

yaml final: - name: notify config: notifies: - notifier: jumeaux message: "{{ title }} is Finish!! There are {{ summary.status.different }} diffs.."

differentのstatusが存在するときのみ通知する

yaml final: - name: notify config: notifies: - notifier: jumeaux message: "There are {{ summary.status.different }} diffs.." when: "summary.status.different > 0"

csv

レポートのtrialsをCSVファイル形式で追加出力します。

Config

Definitions

Key Type Description Example Default
column_names string[] 出力する要素名のリスト [seq, name, status]
output_path string 出力するCSVファイルのパス result.csv
with_header (bool) ヘッダ行を出力するか true false
column_names

以下の要素が有効です。

Name Description
seq シーケンス
name 名称
method HTTPメソッド
path パス
headers ヘッダ(JSON文字列)
queries クエリ(JSON文字列)
request_time リクエスト日時
status ステータス
one.url oneのリクエストURL
one.status oneのステータスコード
one.byte oneのレスポンスサイズ
one.response_sec oneのレスポンスタイム(秒)
one.content_type oneのコンテントタイプ
one.encoding oneのレスポンスエンコーディング
other.url otherのリクエストURL
other.status otherのステータスコード
other.byte otherのレスポンスサイズ
other.response_sec otherのレスポンスタイム(秒)
other.content_type otherのコンテントタイプ
other.encoding otherのレスポンスエンコーディング

Examples

seq name status の要素を出力する

yaml final: - name: csv config: column_names: - seq - name - status output_path: result.csv

seq name status, one.response_sec, other.response_sec の要素をヘッダ付きで出力する

yaml final: - name: csv config: with_header: true column_names: - seq - name - status - one.response_sec - other.response_sec output_path: result.csv

viewer

結果をGUIで確認するためのHTMLを出力します。

出力されるindex.htmlは同じディレクトリに以下のエントリがいる前提で動作します。

  • oneディレクトリ
  • otherディレクトリ
  • report.json

report.jsonを作成するにはfinal/jsonアドオンを指定してください。

Config

Definitions

Config設定はありません。

Examples

結果をGUIで確認するためのviewerを同梱する

yaml final: - name: json # report.jsonが必要なため - name: viewer