• Save
Fxug@北陸in富山 - Flex Unit4Beta1+α -
Upcoming SlideShare
Loading in...5
×
 

Fxug@北陸in富山 - Flex Unit4Beta1+α -

on

  • 3,528 views

FlexUnit4Beta1に関する概要

FlexUnit4Beta1に関する概要
+ Flexcoverとか

Statistics

Views

Total Views
3,528
Views on SlideShare
3,512
Embed Views
16

Actions

Likes
3
Downloads
0
Comments
0

1 Embed 16

http://www.slideshare.net 16

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Fxug@北陸in富山 - Flex Unit4Beta1+α - Fxug@北陸in富山 - Flex Unit4Beta1+α - Presentation Transcript

  • FlexUnit4(Beta1...) +Flexcover FlexMonkey
  • • @hikaruworld • Java • Flex • Javascript Python
  • 1. FlexUnit4 2. Flexcover 3. FlexMonkey
  • UnitTesting •FlexUnit4 • Flexcover • FlexMonkey etc...
  • UnitTesting •FlexUnit4 Beta1 • Flexcover • FlexMonkey etc...
  • FlexUnit4 (Beta1) • 2009/06/29 Beta ... • JUnit4 • FlashBuilder4 ... • • GUI • FlexUnit, fluint
  • http://bugs.adobe.com/ jira/browse/FB-18873
  • http://bugs.adobe.com/ jira/browse/FB-18873
  • • libs/FlexUnit1Lib.swc • libs/FlexUnit4.swc • libs/FlexUnit4UIRunner.swc • libs/hamcrest-as3.swc
  • (GUI) • src/FlexUnit4Turnkey.mxml ( OK.) 1. FlexUnitCore 2. addListener() 3. FlexUnitCore .run() (GUI UIListener new ) 4. run()
  • import flash.display.Sprite; import org.flexunit.runner.FlexUnitCore; public class FlexUnit4CUI extends Sprite { public function FlexUnit4CUI() { var core:FlexUnitCore = new FlexUnitCore(); core.run( ); } }
  • JUnit4→FlexUnit4 • @Test • [Test] • @Before • [Before] • @BeforeClass • [BeforeClass] • @After • [After] • @AfterClass • [AfterClass] • @Ignore • [Ignore]
  • flexunit.framework.*
  • org.flexunit.*
  • package { import org.flexunit.Assert; public class CalculateTest { private var target:Calculate { [Test] public function ():void { target = new Calculate(); Assert.assertEquals(2, target.add(1, 1)) } } } }
  • Before and After • [Test] / • [async] [ui] • Before/After [Before(order=1)]
  • BeforeClass/AfterClass • / • static
  • Before/After →
  • Exception Handling • [Test(expected=” ”)] • expected throw Error ex)flash.errors.IllegalOperationError
  • [Test(expected=”flash.errors.IllegalOperationError”)] public function exceptionTest():void { throw new IllegalOperationError(“error...”); }
  • Ignore • [Ignore] • [Test] • • [Ignore(“ ”)]
  • [Ignore(“ ”)] [Test] public function ignoreTest():void { // }
  • Ignore • org.flexunit.flexui.TestRunnerBase.mxml Ignore ? • I •
  • 7/2/2009 17:08:19.629 [INFO] FlexUnit4 ignore::IgnoreTest. . ← 7/2/2009 17:08:19.632 [INFO] FlexUnit4 ignore::IgnoreTest. I ←
  • Async • Async fluint • Before/After/Test • timeout=” ” • [Test(async, timeout=”500”)] • Async.asyncHandler
  • [Test(async, timeout=”500”)] public function ():void { var timer:Timer = new Timer(300, 1); timer.addEventListener(TimerEvent.TIME_COMPLETE, Async.asyncHandler(this, onResult, 300)); timer.start(); } private function onResult( e:TimerEvent, passThrowsData:Object):void{ Assert.assertEquals(e.type, “timeComplete”); }
  • Hamcrest • • Hamcrest AS3 • • assertThat( , ( ))
  • http://github.com/drewbourne/ hamcrest-as3/tree/master
  • • Hamcrest-AS3 ? • ASDoc • • Java PHP • org.hamcrest.number org.hamcrest.text org.hamcrest.object....
  • • assertThat(3, isA(3)); • assertThat(“hoge”, not(“piyo”)); • assertThat(3, between(1, 10, false)); • assertThat(“abcdefg”, allOf( startsWith(“a”), endsWith(“g”))); • etc.....
  • Suite and RunWith • • [RunWith(“org.flexunit.runners.Suite”)] • • • public var hoge:HogeTest;
  • package { [Suite] [RunWith(“org.flexunit.runners.Suite”)] public class UtilSuite { // public var test1:HogeTest; public var test2:PiyoTest; } }
  • • • issueId description milestone • [Test(issueId=#256, milestone=”ver2.30”)] • ( )
  • Assumption • • assumThat • assumThat • Theory
  • [Test(description=” ”)] public function assumeThatOKTest():void { assumeThat(1, isA(1)); Assert.fail(“ ”); } [Test(description=” ”)] public function assumeThatNGTest():void { assumeThat(1, isA(3)); Assert.fail(“ ”); }
  • 7/2/2009 18:27:25.420 [INFO] FlexUnit4 assumption:: assumeThatNGTest . 7/2/2009 18:27:25.424 [INFO] FlexUnit4 assumption::NG I 7/2/2009 18:27:25.429 [INFO] FlexUnit4 assumption:: assumeThatOKTest . 7/2/2009 18:27:25.449 [WARN] FlexUnit4 assumption:: assumeThatOKTest E
  • Theory and Datapoint • ? ? • RunWith org.flexunit.experimental.theories.Theories • [Test] [Theory] • [Datapoint]
  • ( • Datapoint 1 ?
  • User Interface • ui • • [Before(async, ui)]
  • [Before(async, ui)] public function setup():void { var textInput:TextInput = new TextInput(); Async.proceedOnEvent( this, textInput, FlexEvent.CREATION_COMPLETE, 200); UIImpersonator.addChild( panel ); }
  • UnitTesting •FlexUnit4 • Flexcover • FlexMonkey etc...
  • Flexcover • FlexUnit • GUI • • JUnit XML • Flex3.2 (Flex3.3 ?) •
  • • AS3 • • • • •
  • • Flexcover0.81 • FlexSDK3.3 (Version 3.3.0 build 4852) • CoverageView.air
  • FlexUnit • • FlexSDK OK • →CoverageView →
  • • Ant • • Hudson
  • https://issues.sonatype.org/ browse/FLEXMOJOS-18
  • UnitTesting •FlexUnit4 • Flexcover • FlexMonkey etc...
  • • FlexAutomationAPI • FlexUnit FlexSpy • FlexMonkey1.0
  • FlexMonkey1.0
  • • http://opensource.adobe.com/wiki/display/ flexunit/FlexUnit+4+feature+overview • http://www.insideria.com/2009/05/ flashbuilder4-will-support-fle.html • http://github.com/drewbourne/hamcrest- as3/tree/master
  • • blog ( • http://prepro.wordpress.com/