SlideShare a Scribd company logo
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

More Related Content

PDF
Python-nose: A unittest-based testing framework for Python that makes writing...
ODP
Pyunit
PDF
Test Driven Development With Python
PDF
Python Unit Test
PPTX
unittest in 5 minutes
PDF
Python unittest
PDF
Python testing using mock and pytest
PDF
Effective testing with pytest
Python-nose: A unittest-based testing framework for Python that makes writing...
Pyunit
Test Driven Development With Python
Python Unit Test
unittest in 5 minutes
Python unittest
Python testing using mock and pytest
Effective testing with pytest

What's hot (20)

PDF
Py.test
PPT
Selenium with py test by Alexandr Vasyliev for Lohika Odessa Python TechTalks
PDF
Pytest - testing tips and useful plugins
PPT
Struts2 in a nutshell
PPTX
Unit Testng with PHP Unit - A Step by Step Training
PPT
Advanced PHPUnit Testing
PPT
Unit Testing using PHPUnit
PPT
Test Driven Development with PHPUnit
PDF
PHPUnit best practices presentation
PDF
Test your code like a pro - PHPUnit in practice
PPTX
Network automation with Ansible and Python
PDF
PhpUnit Best Practices
PPT
Introduzione al TDD
PPTX
Python Programming Essentials - M39 - Unit Testing
PPT
Practical Ext JS Debugging
PPT
Phpunit testing
PDF
Organizing Machine Learning Projects - Repository Organization
PPTX
Python Programming Essentials - M25 - os and sys modules
PDF
Keep your repo clean
Py.test
Selenium with py test by Alexandr Vasyliev for Lohika Odessa Python TechTalks
Pytest - testing tips and useful plugins
Struts2 in a nutshell
Unit Testng with PHP Unit - A Step by Step Training
Advanced PHPUnit Testing
Unit Testing using PHPUnit
Test Driven Development with PHPUnit
PHPUnit best practices presentation
Test your code like a pro - PHPUnit in practice
Network automation with Ansible and Python
PhpUnit Best Practices
Introduzione al TDD
Python Programming Essentials - M39 - Unit Testing
Practical Ext JS Debugging
Phpunit testing
Organizing Machine Learning Projects - Repository Organization
Python Programming Essentials - M25 - os and sys modules
Keep your repo clean
Ad

Viewers also liked (7)

PPTX
How Not To Code Flex Applications
PPT
What’s under your skin
PPTX
Streaming video to html
PPTX
Building a Dash-264 Player
PPT
Risk mgt basel norms,caiib
PPT
26882112 Basel Ii Concept Implication
PPT
Financial Risk Management Framwork & Basel Ii Icmap
How Not To Code Flex Applications
What’s under your skin
Streaming video to html
Building a Dash-264 Player
Risk mgt basel norms,caiib
26882112 Basel Ii Concept Implication
Financial Risk Management Framwork & Basel Ii Icmap
Ad

Similar to Flex Unit 4 Feature Overview (20)

PPT
Automated Unit Testing
PPT
Mxunit
PPTX
Appium TestNG Framework and Multi-Device Automation Execution
PPTX
Testing with VS2010 - A Bugs Life
KEY
Fxug@北陸in富山 - Flex Unit4Beta1+α -
KEY
Unit testing en iOS @ MobileCon Galicia
PDF
White paper for unit testing using boost
PDF
vitest-en.pdf
ODP
Grails unit testing
PPT
3 j unit
PPT
Unit testing
PPT
Performance and Scalability Testing with Python and Multi-Mechanize
PDF
Unit testing with JUnit
PDF
maXbox Starter 36 Software Testing
PPTX
Junit mockito and PowerMock in Java
PPT
Core Php Component Presentation
PPT
Corephpcomponentpresentation 1211425966721657-8
PDF
JUnit & Mockito, first steps
PPT
Simple API for XML
DOCX
C-Sharp Arithmatic Expression Calculator
Automated Unit Testing
Mxunit
Appium TestNG Framework and Multi-Device Automation Execution
Testing with VS2010 - A Bugs Life
Fxug@北陸in富山 - Flex Unit4Beta1+α -
Unit testing en iOS @ MobileCon Galicia
White paper for unit testing using boost
vitest-en.pdf
Grails unit testing
3 j unit
Unit testing
Performance and Scalability Testing with Python and Multi-Mechanize
Unit testing with JUnit
maXbox Starter 36 Software Testing
Junit mockito and PowerMock in Java
Core Php Component Presentation
Corephpcomponentpresentation 1211425966721657-8
JUnit & Mockito, first steps
Simple API for XML
C-Sharp Arithmatic Expression Calculator

Recently uploaded (20)

PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Cloud computing and distributed systems.
PPTX
Spectroscopy.pptx food analysis technology
PDF
Encapsulation theory and applications.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
Understanding_Digital_Forensics_Presentation.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
MYSQL Presentation for SQL database connectivity
Cloud computing and distributed systems.
Spectroscopy.pptx food analysis technology
Encapsulation theory and applications.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Spectral efficient network and resource selection model in 5G networks
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Network Security Unit 5.pdf for BCA BBA.
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Building Integrated photovoltaic BIPV_UPV.pdf
MIND Revenue Release Quarter 2 2025 Press Release
“AI and Expert System Decision Support & Business Intelligence Systems”
Diabetes mellitus diagnosis method based random forest with bat algorithm

Flex Unit 4 Feature Overview

  • 1. FlexUnit 4 Feature Overview Jeff Tapper Digital Primates [email_address] Twitter: jefftapper
  • 2. Features Support for all JUnit 4 features Metadata driven Exception Handling Async Support Hamcrest Support Runners Theories and Assumptions Now Available
  • 3. Metadata tags [Test] [Suite] [Before] [After] [BeforeClass] [AfterClass] [Ignore]
  • 4. 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 ); }
  • 5. 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 );
  • 6. 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)); }
  • 7. 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
  • 8. 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 }
  • 9. 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