Flex Unit 4 Feature Overview
Upcoming SlideShare
Loading in...5
×
 

Flex Unit 4 Feature Overview

on

  • 7,184 views

A quick feature overview on FlexUnit 4

A quick feature overview on FlexUnit 4

Statistics

Views

Total Views
7,184
Slideshare-icon Views on SlideShare
6,245
Embed Views
939

Actions

Likes
1
Downloads
46
Comments
0

7 Embeds 939

http://blogs.digitalprimates.net 595
http://www.digitalprimates.net 317
http://www.slideshare.net 17
http://kslash.jp 5
http://webcache.googleusercontent.com 2
http://dev.digitalprimates.net 2
http://blogs.digitalprimates.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

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

    Flex Unit 4 Feature Overview Flex Unit 4 Feature Overview Presentation Transcript

    • FlexUnit 4 Feature Overview Jeff Tapper Digital Primates [email_address] Twitter: jefftapper
    • Features
      • Support for all JUnit 4 features
      • Metadata driven
      • Exception Handling
      • Async Support
      • Hamcrest Support
      • Runners
      • Theories and Assumptions
      • Now Available
    • Metadata tags
      • [Test]
      • [Suite]
      • [Before]
      • [After]
      • [BeforeClass]
      • [AfterClass]
      • [Ignore]
    • Exception handling
      • When a test expects to throw an error, test code traditionally requires more work (try/catch/assert)
      • New expects attribute of Test metadata allows us to define an expected exception
      • [Test(expects="TypeError")] public function divisionWithException():void {    simpleMath.divide( 11, 0 ); }
    • Async Support
      • [Test(async,timeout="500")]
      • public function doSomethingAsynchronous():void {}
      • Async.proceedOnEvent( testCase, target, eventName );
      • Async.failOnEvent( testCase, target, eventName );
      • Async.handleEvent( testCase, target, eventName, eventHandler );
      • Async.asyncHandler( testCase, eventHandler );
      • Async.asyncResponder( testCase, responder );
    • Hamcrest Support
      • Making use of the HamcrestAS3 project, a new, rich set of asserts are now available
      • [Test]
      • public function isItInHere():void {
      • var someArray:Array = [ 'a', 'b', 'c', 'd', 'e'];
      •    assertThat( someArray, hasItems("b", "c") );
      • }
      • [Test]
      • public function isItClose( num1:Number, num2:Number):void{
      • assertThat ( num1, closeTo(num2,.01));
      • }
    • Runners
      • Suites can be decorated with [RunWith] metadata to define the test runner
      • [RunWith("org.flexunit.runners.Suite")]
      • Allows for running tests written in other testing frameworks to run in FU4
      • Runners currently exist for FlexUnit1,FlexUnit4,Fluint,SLT, and more on the way
    • Theories Datapoints and Assumptions
      • Allows for a single test to be run with several different pieces of data
      • [DataPoints] [ArrayElementType("String")] public static var stringValues:Array = ["one","two","three","four","five"];
      • [DataPoints] [ArrayElementType("int")] public static function provideData():Array {    return [-10, 0, 2, 4, 8, 16 ]; }
      • [Theory] public function testStringIntCombo( value:int, stringValue:String ):void {             //call some method and do something }
    • Now Available
      • Beta 1 went public on opensource.adobe.com on Monday.
      • Feature requests and bugs can be files in Adobe’s JIRA system
      • More Info at:
      • http://opensourece.adobe.com
      • http://blogs.digitalprimates.net