Submit Search
Upload
StarlingをFlexUnitで ユニットテストしてみる。
•
1 like
•
1,000 views
U
utweb
Follow
東京ひよこの会 (第7回勉強会)の発表資料。
Read less
Read more
Technology
Report
Share
Report
Share
1 of 15
Download now
Download to read offline
Recommended
Vagrantでwindows仮想環境を構築しよう
Vagrantでwindows仮想環境を構築しよう
Yuta Matsumura
2016年第一回プレ卒研in山口研
2016年第一回プレ卒研in山口研
dmcc2015
20121019 jenkins勉強会lt資料
20121019 jenkins勉強会lt資料
Hiroko Tamagawa
なぜ Enterprise は Sencha を選ぶのか?
なぜ Enterprise は Sencha を選ぶのか?
久司 中村
Scc2013 air
Scc2013 air
Jun Futakawa
FlashBuilderでスマホアプリ開発
FlashBuilderでスマホアプリ開発
utweb
「AIRネイティブ拡張」を使って、 AndroidでNFCを読み込んでみた
「AIRネイティブ拡張」を使って、 AndroidでNFCを読み込んでみた
Naoki Yamamoto
動くサイトにプログラムが必要な時代は終わった。〜デザイナー歓喜のAnimate CCとSpineの紹介
動くサイトにプログラムが必要な時代は終わった。〜デザイナー歓喜のAnimate CCとSpineの紹介
utweb
Recommended
Vagrantでwindows仮想環境を構築しよう
Vagrantでwindows仮想環境を構築しよう
Yuta Matsumura
2016年第一回プレ卒研in山口研
2016年第一回プレ卒研in山口研
dmcc2015
20121019 jenkins勉強会lt資料
20121019 jenkins勉強会lt資料
Hiroko Tamagawa
なぜ Enterprise は Sencha を選ぶのか?
なぜ Enterprise は Sencha を選ぶのか?
久司 中村
Scc2013 air
Scc2013 air
Jun Futakawa
FlashBuilderでスマホアプリ開発
FlashBuilderでスマホアプリ開発
utweb
「AIRネイティブ拡張」を使って、 AndroidでNFCを読み込んでみた
「AIRネイティブ拡張」を使って、 AndroidでNFCを読み込んでみた
Naoki Yamamoto
動くサイトにプログラムが必要な時代は終わった。〜デザイナー歓喜のAnimate CCとSpineの紹介
動くサイトにプログラムが必要な時代は終わった。〜デザイナー歓喜のAnimate CCとSpineの紹介
utweb
自分史上一番早い2024振り返り〜コロナ後、仕事は通常ペースに戻ったか〜 by IoT fullstack engineer
自分史上一番早い2024振り返り〜コロナ後、仕事は通常ペースに戻ったか〜 by IoT fullstack engineer
Yuki Kikuchi
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)
Hiroshi Tomioka
モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察 ~Text-to-MusicとText-To-ImageかつImage-to-Music...
モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察 ~Text-to-MusicとText-To-ImageかつImage-to-Music...
博三 太田
CTO, VPoE, テックリードなどリーダーポジションに登用したくなるのはどんな人材か?
CTO, VPoE, テックリードなどリーダーポジションに登用したくなるのはどんな人材か?
akihisamiyanaga1
デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)
デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)
UEHARA, Tetsutaro
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
NTT DATA Technology & Innovation
クラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdf
クラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdf
FumieNakayama
AWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdf
AWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdf
FumieNakayama
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
More Related Content
Recently uploaded
自分史上一番早い2024振り返り〜コロナ後、仕事は通常ペースに戻ったか〜 by IoT fullstack engineer
自分史上一番早い2024振り返り〜コロナ後、仕事は通常ペースに戻ったか〜 by IoT fullstack engineer
Yuki Kikuchi
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)
Hiroshi Tomioka
モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察 ~Text-to-MusicとText-To-ImageかつImage-to-Music...
モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察 ~Text-to-MusicとText-To-ImageかつImage-to-Music...
博三 太田
CTO, VPoE, テックリードなどリーダーポジションに登用したくなるのはどんな人材か?
CTO, VPoE, テックリードなどリーダーポジションに登用したくなるのはどんな人材か?
akihisamiyanaga1
デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)
デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)
UEHARA, Tetsutaro
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
NTT DATA Technology & Innovation
クラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdf
クラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdf
FumieNakayama
AWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdf
AWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdf
FumieNakayama
Recently uploaded
(8)
自分史上一番早い2024振り返り〜コロナ後、仕事は通常ペースに戻ったか〜 by IoT fullstack engineer
自分史上一番早い2024振り返り〜コロナ後、仕事は通常ペースに戻ったか〜 by IoT fullstack engineer
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版:キンドリルジャパン社内勉強会:2024年4月発表)
モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察 ~Text-to-MusicとText-To-ImageかつImage-to-Music...
モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察 ~Text-to-MusicとText-To-ImageかつImage-to-Music...
CTO, VPoE, テックリードなどリーダーポジションに登用したくなるのはどんな人材か?
CTO, VPoE, テックリードなどリーダーポジションに登用したくなるのはどんな人材か?
デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)
デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
クラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdf
クラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdf
AWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdf
AWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdf
Featured
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Featured
(20)
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
Skeleton Culture Code
Skeleton Culture Code
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
How to have difficult conversations
How to have difficult conversations
Introduction to Data Science
Introduction to Data Science
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
The six step guide to practical project management
The six step guide to practical project management
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
StarlingをFlexUnitで ユニットテストしてみる。
1.
StarlingをFlexUnitで ユニットテストしてみる。 FlashBuilderで。
2.
自己紹介 • 宇都宮正宗 1975生まれ。プログラマー。 •
@masamunet • 大阪で、宇都宮ウエブ制作所という屋号でいろいろ やっています。
3.
あらかじめ謝っておくこと • Starlingに限った方法ではないこと • モバイル(AIR
for iOS)とも直接関係ないこと • 厳密にユニットテストというと疑問があること • FlashBuilderという、限られた開発環境でのお話し であること
4.
やりたいこと • 狙ったViewを、FlexUnit環境で表示させたい! • assertはできなくてもいい •
assertさせたい処理は別クラスで書くので • 動きのチェックなど、目視でしか判断できないと ころを繰り返し表示させたいので
5.
どのようにテストするか • 別プロジェクトにわけてテストする • やり方がわからなかった… •
プロジェクト内にtestパッケージを作ってその中でテストする • リファクタリング時に、テストのエラーが残るとコンパイル 出来なくなる • 厳格に考えればそれでいいのかもしれないけど… • 今回はこっちでやります
6.
ポインヨ • 最終的には任意のViewを、Starlingのstageに addChildしたい • いかにFlexUnitのstageを参照出来るようにするか •
別にStarlingに限った話しではないけど… • 「FlexUnit stage」でぐぐる • 前提条件が違うのか、どれもうまく動かず…
7.
ポインヨ • 最終的には、テストケースクラスに、stageを参照 できるようにして、そこに任意のViewをaddChild させれば何でもよい • 今回はこのへんを参考にしてみる http://forum.starling-framework.org/topic/ testing-starling-application-with-flexunit
8.
やってみよう • FlexUnitのstageを参照出来るようなクラスを作 成。 FlexUnitStarlingIntegration.as https://github.com/masamunet/ StarlingFlexunitTest/blob/master/test/ FlexUnitStarlingIntegration.as
9.
やってみよう • テストケースごとにStarlingを初期化する処理を共 通できるように親クラスを作成 TestStarlingDisplayObject.as https://github.com/masamunet/ StarlingFlexunitTest/blob/master/test/views/ TestStarlingDisplayObject.as
10.
やってみよう • 各テストケースはTestStarlingDisplayObjectを継承。 • [Before]タグのメソッド内でstart()しとけば、あとは適 当に非同期処理してくれるようにする。 https://github.com/masamunet/StarlingFlexunitTest/ blob/master/test/views/TestGrowthView.as https://github.com/masamunet/StarlingFlexunitTest/ blob/master/test/views/TestProtrudeView.as
11.
やってみよう • 自動生成されるFlexUnitApplication.asのコンストラク タ内に、FlexUnitのstageを参照させるように、次の処 理を追加。 FlexUnitStarlingIntegration.nativeStage =
stage; • これ毎回しないといけないので超めんどい。 https://github.com/masamunet/StarlingFlexunitTest/ blob/master/FlexUnitApplication.as
12.
やってみよう • FlexUnitApplication-app.xmlのrenderModeを directに。 <renderMode>direct</renderMode> • これも毎回勝手に書き換わるので面倒臭くてしぬ。 https://github.com/masamunet/ StarlingFlexunitTest/blob/master/ FlexUnitApplication-app.xml
13.
問題点 • テストケースを変更するたびに、 FlexUnitApplication-app.xml FlexUnitApplication.as が勝手に書き換わるので、その都度こちらで手を加 えなければいけない。 • ここのテンプレート触れればいいのだけど…。 •
このへんはもしかして、FlashBuilderでなければ解 決できるのかもしれない。
14.
• assertさせないなんてテストじゃないなんて声も聞こえてきそう だけど、そこはほら、テストスウィートの皮を被ったオレオレテ ストですから。 • 逆にassertさせにくい、動きの調整を繰り返し行うようなときに 便利。 •
そもそも、assertで拾っておきたい処理はviewと切り離してお くほうがいいのでは?とも思う。 • あとこれだと一発で画面表示できるの便利。 • モバイル開発でANEを導入したあとのタイミングで、実機でしか 動かなくなったときも便利。
15.
ご静聴ありがとう ございました。
Download now