1 / 14

Thomas Burleson

Thomas Burleson. Continuous Testing with Flex & Coldfusion Projects. Oooh no! Not another session of “how to test”…. June 27, 2007. Not another session on “How to test” - already have great online resources for CFUnit , CFCUnit , Flex Unit. So why this session?

sheena
Download Presentation

Thomas Burleson

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Thomas Burleson

  2. Continuous Testing withFlex & ColdfusionProjects Oooh no! Not another session of “how to test”… June 27, 2007

  3. Not another session on “How to test” - already have great online resources for CFUnit, CFCUnit, Flex Unit So why this session? - stress “if you are not consistently testing, you are crazy!” - no repeatable tests ? - no version control ? - no regression testing ? - No more excuses… - Let the “tools” do the work.

  4. Overview (1) Traditional Approach [CFML] (2) Using Testing Framework(s) (3) Misconceptions (4) Problems with Testing Frameworks (5) Introducing the “Synchronizer” (6) Let the “tools do the work…” (7) Resources….

  5. Traditional Approach (1) Create 1 or more CFCs; each with 1 or more methods … see code examples (2) Create 1 or more CFML pages to test and debug the CFC output … see code examples Note: the above approach is same even if using MVC framework like Mach-ii or Model-Glue This is bad! Let’s see why….

  6. Issues with Traditional Approach it is Ad-HOC (makeshift…)! (1) How do make sure you test each method of an CFC? (2) No way to easily test all .cfcs (3) Does not also test “boundary conditions”. (4) No way to test all functions for all .cfcs regressively (5) Cannot build up a repertoire of tests to verify your code.

  7. Using Testing Frameworks (1) CFUnit or CFCUnit for Coldfusion FlexUnit for Flex (2) Quick Review of CFUnit - Installation - Creating / Using TestCases (3) Using TestRunner CFML to run the TestCases (4) Using Eclipse Ant to runt the TestCases … see example … see example … see example

  8. Common Misconceptions (1) Have to write the test code 1st [ala Test-Driven Development] (2) Have to change development style (3) Its too late… if the code base already exists without tests…

  9. Problems with Testing Framework (1) Too much business code already exists… to tedious to generate for each. (2) Code changes to business CFCs are not mapped to TestCases - reasons: lazy or easy to forget. (3) Updated the TestCases, but forgot to update the TestRunner

  10. Introducing the Synchronizer (1) Always watches the business components (2) Always synchronizes TestCase & test<xxx> methods (3) Auto-updates the TestRunner (4) Does the CRUD - but does not implement the logic! - huh? … see example

  11. Configuring the Synchronizer Understanding Eclipse Ant w/ Synchronizer (1) Modify synchronizer.xml (2) Modify runSynchronizer.xml (3) Launch the Synchronizer - see output in Console (4) Configure the Synchronizer to run during EACH build! … see example … see example … see example You must write the test logic… !

  12. Using the FlexUnitwith Flex (1) Using FlexUnit Framework (2) Building FlexUnitTestcases (3) Configure TestRunner w/ TestCases (4) Launch TestRunner (5) Ant Launch of TestRunner … see example … see example … see example

  13. Using the Synchronizer with Flex (1) Configure to watch .AS files [non-UI files] (2) Auto-Updating TestRunner (3) Ant Launch of TestRunner … see example … see example … see example

  14. Let the tools do the work… (1) Use Test Frameworks (2) Use Synchronizer (3) Use Eclipse Ant (4) Use SVN (5) Use Automated Builds

More Related