More Related Content Similar to Asakusaソースコードリーディング #4 – Asakusa Test Driver Similar to Asakusaソースコードリーディング #4 – Asakusa Test Driver (20) Asakusaソースコードリーディング #4 – Asakusa Test Driver2. Asakusaソースコードリーディング#4 2
本⽇日の内容
l A Brief History of Asaksa Test Driver
l TestDriverが誕⽣生するまで (〜~ver 0.1)
l TestDriverのリアーキテクト (〜~ver 0.2)
l TestDriverのこれから
l Asakusa CI on AWS
l Source Code Reading
l TestDriver ver 0.2 API
2
3. Asakusaソースコードリーディング#4 3
⾃自⼰己紹介
l 川⼝口 章 (@apirakun)
l Asakusa Frameworkの活動
n Asakusa Test Driverの設計/実装
n CI環境のメンテナンス (Jenkins)
n ソースリポジトリ管理理 (GitHub)
n ビルド・リリース管理理 (Maven)
n ドキュメントの公開 (Sphinx)
n 開発環境・デプロイ周り (misc.)
l 普段の仕事
n SI:Web系の⾃自動テストツール開発
n 流流通ミドルウェアの技術サポート
4. Asakusaソースコードリーディング#4 4
リソース
l Source Code (branch:0.2-develop)
l https://github.com/asakusafw/asakusafw/
tree/0.2-develop
n asakusa-test-driver
n asakusa-test-modelator
n asakusa-test-data-provider
n asakusa-thundergate-test-modelator
l Documents (アプリケーションのテスト)
l http://asakusafw.s3.amazonaws.com/
documents/0.2/release/ja/html/testing/
index.html
4
7. Asakusaソースコードリーディング#4 7
Batch Dataflow ProcessDataflow Part
各種DSLの構造
l 層ごとに書くべきことが異異なる
7
UoW
#1
UoW
#2
UoW
#3
UoW
#4
1. ……………
1.1. ………
1.2. ………
2. ……………
2.1. ………
2.2. ………
2.a. ………
3. …………
4. …………
Batch DSL Flow DSL Operator DSL
Review
18. Asakusaソースコードリーディング#4 18
Asakusa Test Driver (0.1)
l TestDriver(0.1)が提供するもの
l testdriver.XXXTestDriver
n FlowPart-/JobFlow-/Batch-
l 特徴
l Ashigel Compiler/HadoopJob/ThunderGateの実⾏行行
を隠蔽
l ModelGeneratorから緻密なテストデータ定義が可
能なテストデータのTemplate(Excel)を⽣生成
l 各種DSLで同じようにテスト出来るシンプルなAPI
l テストが⾃自動化出来る
l スタンドアロンモードで動作
本資料料ではパッケージ名の
com.asakusafw は省省略略
21. Asakusaソースコードリーディング#4 21
Asakusa Test Driver (0.2)
l NewAPIの提供
l testdriver.XXXTester
n FlowPart-/JobFlow-/Batch-
l 特徴
l ThunderGate以外の外部連携に対応
n ファイルインターフェース
l Excel以外のテストデータ⼊入出⼒力力に対応
n デフォルトはJSONとExcelを提供
n Excelフォーマットも0.1細かく改善(Calcも使える)
l SPIで拡張可能
n Ashigel Compilerに似た拡張戦略略
31. Asakusaソースコードリーディング#4 31
Amazon S3Amazon EC2
Asakusa CI環境の構成
Jenkins
Master
GitHub
Development
Environment
git push
<Service Hooks>
Post Receive URLs
Jenkins
Slave
<Amazon EC2 Plugin>
distributed build Maven
Repository
Documents
deploy
copy
tweet
Maven Archetype
Catalog
Twitter
50. Asakusaソースコードリーディング#4 50
実はあります
l Issue#64:Enable to input expect data from
database table.
l https://github.com/asakusafw/asakusafw/issues/64
l 修正内容
l TableSourceProviderを追加
n testdriver.bulkloader.TableSourceProvider
l SPIの定義ファイルを追加
n src/main/resources/META-INF/services/
com.asakusafw.testdriver.core.SourceProvider
l 使い⽅方
l URIに以下の⽂文字列列を指定
n “bulkloader:<target_name>:<table_name>”
n 例例:”bulkloader:asakusa:ORDER”