SlideShare uma empresa Scribd logo
1 de 67
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/

Mais conteúdo relacionado

Mais procurados

Bz backtrack.usage
Bz backtrack.usageBz backtrack.usage
Bz backtrack.usage
djenoalbania
 
Scraping recalcitrant web sites with Python & Selenium
Scraping recalcitrant web sites with Python & SeleniumScraping recalcitrant web sites with Python & Selenium
Scraping recalcitrant web sites with Python & Selenium
Roger Barnes
 

Mais procurados (20)

Bz backtrack.usage
Bz backtrack.usageBz backtrack.usage
Bz backtrack.usage
 
Process Doppelgänging
Process Doppelgänging Process Doppelgänging
Process Doppelgänging
 
Inheritance
InheritanceInheritance
Inheritance
 
Idiomatic spock
Idiomatic spockIdiomatic spock
Idiomatic spock
 
C++ Windows Forms L01 - Intro
C++ Windows Forms L01 - IntroC++ Windows Forms L01 - Intro
C++ Windows Forms L01 - Intro
 
Deploying on the cutting edge
Deploying on the cutting edgeDeploying on the cutting edge
Deploying on the cutting edge
 
"Less Painful iOS Development" by Samuel Edwin (Tokopedia)
"Less Painful iOS Development" by Samuel Edwin (Tokopedia)"Less Painful iOS Development" by Samuel Edwin (Tokopedia)
"Less Painful iOS Development" by Samuel Edwin (Tokopedia)
 
Scraping recalcitrant web sites with Python & Selenium
Scraping recalcitrant web sites with Python & SeleniumScraping recalcitrant web sites with Python & Selenium
Scraping recalcitrant web sites with Python & Selenium
 
データーベースとインデックス
データーベースとインデックスデーターベースとインデックス
データーベースとインデックス
 
Migrating from drupal to plone with transmogrifier
Migrating from drupal to plone with transmogrifierMigrating from drupal to plone with transmogrifier
Migrating from drupal to plone with transmogrifier
 
Learning Git with Workflows
Learning Git with WorkflowsLearning Git with Workflows
Learning Git with Workflows
 
Minimal MVC in JavaScript
Minimal MVC in JavaScriptMinimal MVC in JavaScript
Minimal MVC in JavaScript
 
チームメイトのためにdocstringを書こう! pyconjp2019
チームメイトのためにdocstringを書こう! pyconjp2019チームメイトのためにdocstringを書こう! pyconjp2019
チームメイトのためにdocstringを書こう! pyconjp2019
 
Exploring Clojurescript
Exploring ClojurescriptExploring Clojurescript
Exploring Clojurescript
 
Membuat virtual environment python
Membuat virtual environment pythonMembuat virtual environment python
Membuat virtual environment python
 
[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...
[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...
[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...
 
How Secure Are Docker Containers?
How Secure Are Docker Containers?How Secure Are Docker Containers?
How Secure Are Docker Containers?
 
HOW TO DEAL WITH BLOCKING CODE WITHIN ASYNCIO EVENT LOOP
HOW TO DEAL WITH BLOCKING CODE WITHIN ASYNCIO EVENT LOOPHOW TO DEAL WITH BLOCKING CODE WITHIN ASYNCIO EVENT LOOP
HOW TO DEAL WITH BLOCKING CODE WITHIN ASYNCIO EVENT LOOP
 
Virtual Bolt Workshop - April 28, 2020
Virtual Bolt Workshop - April 28, 2020Virtual Bolt Workshop - April 28, 2020
Virtual Bolt Workshop - April 28, 2020
 
ORMs in Golang
ORMs in GolangORMs in Golang
ORMs in Golang
 

Destaque (8)

More classwork notes & examples
More classwork notes & examplesMore classwork notes & examples
More classwork notes & examples
 
Premiere And Amg Systems
Premiere And Amg SystemsPremiere And Amg Systems
Premiere And Amg Systems
 
Ch1organization
Ch1organizationCh1organization
Ch1organization
 
21st Century Skills
21st Century Skills21st Century Skills
21st Century Skills
 
Health,Wellnessand Recovery082109 Presentation
Health,Wellnessand Recovery082109 PresentationHealth,Wellnessand Recovery082109 Presentation
Health,Wellnessand Recovery082109 Presentation
 
Flex Monkey
Flex MonkeyFlex Monkey
Flex Monkey
 
MacユーザからみるWindows7
MacユーザからみるWindows7MacユーザからみるWindows7
MacユーザからみるWindows7
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your Niche
 

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

Server Side JavaScript - You ain't seen nothing yet
Server Side JavaScript - You ain't seen nothing yetServer Side JavaScript - You ain't seen nothing yet
Server Side JavaScript - You ain't seen nothing yet
Tom Croucher
 
iOS 2 - The practical Stuff
iOS 2 - The practical StuffiOS 2 - The practical Stuff
iOS 2 - The practical Stuff
Petr Dvorak
 
Appsec usa2013 js_libinsecurity_stefanodipaola
Appsec usa2013 js_libinsecurity_stefanodipaolaAppsec usa2013 js_libinsecurity_stefanodipaola
Appsec usa2013 js_libinsecurity_stefanodipaola
drewz lin
 
Unit testing in iOS featuring OCUnit, GHUnit & OCMock
Unit testing in iOS featuring OCUnit, GHUnit & OCMockUnit testing in iOS featuring OCUnit, GHUnit & OCMock
Unit testing in iOS featuring OCUnit, GHUnit & OCMock
Robot Media
 
Automated User Tests with Apache Flex
Automated User Tests with Apache FlexAutomated User Tests with Apache Flex
Automated User Tests with Apache Flex
Gert Poppe
 

Semelhante a Fxug@北陸in富山 - Flex Unit4Beta1+α - (20)

Create, test, secure, repeat
Create, test, secure, repeatCreate, test, secure, repeat
Create, test, secure, repeat
 
Renaissance of JUnit - Introduction to JUnit 5
Renaissance of JUnit - Introduction to JUnit 5Renaissance of JUnit - Introduction to JUnit 5
Renaissance of JUnit - Introduction to JUnit 5
 
CP3108B (Mozilla) Sharing Session on Add-on SDK
CP3108B (Mozilla) Sharing Session on Add-on SDKCP3108B (Mozilla) Sharing Session on Add-on SDK
CP3108B (Mozilla) Sharing Session on Add-on SDK
 
Server Side JavaScript - You ain't seen nothing yet
Server Side JavaScript - You ain't seen nothing yetServer Side JavaScript - You ain't seen nothing yet
Server Side JavaScript - You ain't seen nothing yet
 
iOS 2 - The practical Stuff
iOS 2 - The practical StuffiOS 2 - The practical Stuff
iOS 2 - The practical Stuff
 
Flex Unit 4 Feature Overview
Flex Unit 4 Feature OverviewFlex Unit 4 Feature Overview
Flex Unit 4 Feature Overview
 
SenchaCon 2016: Building a Faceted Catalog of Video Game Assets Using Ext JS ...
SenchaCon 2016: Building a Faceted Catalog of Video Game Assets Using Ext JS ...SenchaCon 2016: Building a Faceted Catalog of Video Game Assets Using Ext JS ...
SenchaCon 2016: Building a Faceted Catalog of Video Game Assets Using Ext JS ...
 
Appsec usa2013 js_libinsecurity_stefanodipaola
Appsec usa2013 js_libinsecurity_stefanodipaolaAppsec usa2013 js_libinsecurity_stefanodipaola
Appsec usa2013 js_libinsecurity_stefanodipaola
 
Getting Started with XCTest and XCUITest for iOS App Testing
Getting Started with XCTest and XCUITest for iOS App TestingGetting Started with XCTest and XCUITest for iOS App Testing
Getting Started with XCTest and XCUITest for iOS App Testing
 
Automated User Tests with Apache Flex
Automated User Tests with Apache FlexAutomated User Tests with Apache Flex
Automated User Tests with Apache Flex
 
FaaS by Microsoft: Azure Functions and Azure Durable Functions
FaaS by Microsoft: Azure Functions and Azure Durable FunctionsFaaS by Microsoft: Azure Functions and Azure Durable Functions
FaaS by Microsoft: Azure Functions and Azure Durable Functions
 
Junit in mule
Junit in muleJunit in mule
Junit in mule
 
Junit in mule
Junit in muleJunit in mule
Junit in mule
 
Junit in mule
Junit in muleJunit in mule
Junit in mule
 
Junit in mule demo
Junit in mule demo Junit in mule demo
Junit in mule demo
 
Unit testing in iOS featuring OCUnit, GHUnit & OCMock
Unit testing in iOS featuring OCUnit, GHUnit & OCMockUnit testing in iOS featuring OCUnit, GHUnit & OCMock
Unit testing in iOS featuring OCUnit, GHUnit & OCMock
 
Automated User Tests with Apache Flex
Automated User Tests with Apache FlexAutomated User Tests with Apache Flex
Automated User Tests with Apache Flex
 
PyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web ApplicationsPyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web Applications
 
Test Driven Development with JavaFX
Test Driven Development with JavaFXTest Driven Development with JavaFX
Test Driven Development with JavaFX
 
Tdd
TddTdd
Tdd
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

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