flexunit

FlexUnit 4 and Cairngorm commands

Does anyone know if it is possible to test remote procedure calls in Cairngorm Commands with FlexUnit 4. I have an old app full of them and before I introduce FlexUnit into the mix would like to hear if anyone has been successful with this. Many thanks, ...

Run AIR Debug Launcher (ADL) without a GUI for continuous build

Is it possible to run the ADL without a GUI so that I can run FlexUnit tests during a nightly build? Right now, when I execute our test runner on our server (Ubuntu 9.04) it fails with the output: "Gtk-WARNING **: cannot open display:". Many thanks for any suggestions! ...

Setting up functional Tests in Flex

I'm setting up a functional test suite for an application that loads an external configuration file. Right now, I'm using flexunit's addAsync function to load it and then again to test if the contents point to services that exist and can be accessed. The trouble with this is that having this kind of two (or more) stage method means tha...

FlexUnit4 in IntelliJ

When I try to run test with FlexUnit4 and IntelliJ, I get this error: SecurityError: Error #2148: SWF file file:///C|/Users/LIC/Projects/ProgramJef/out/production/Flex%2DClient%2DTests/%5Fflexunit.swf cannot access local resource file:///C|/Users/LIC/Projects/ProgramJef/out/production/Flex%2DClient%2DTests/textLayout_1.1.0.604.swf. Only...

FlexUnit - howto check label text

I am trying to automatically verify certain conventions, such as label/table column header text (Sentence Case, use of colons, etc). It would be nice if there was a way in FlexUnit, or other means, to Iterate over all views in the app Get all titles, labels, column headers Run some pattern checks and fail where needed. Does anyone...

Call private method in Flex, Actionscript.

I need it in FlexUnit to test private methods. Is there any possibility to do this via reflection by using describeType or maybe flexUnit has some build in facility? I dislike artificial limitation that i cannot test private functions, it greatly reduces flexibility. Yes it is good design for me to test private functions, so please do no...

Flex Unit testing of library and mxml using FlexUnit

Hi, I have some software classes(library) to run commands on any mxml file. These classes(library) are wrapped in a SWC file. This SWC file is referenced by any sample mxml application (by adding as SWC file). My problem is that I want to test these software classes(library) against my sample mxml file using FlexUnit. That is, I should ...

Problem with FlexUnit4

Hello, I"m a bit confused because FlexUnith 4's behavior. When I use fail() in try-catch body fail method is just ignored. [Test] public function extend():void { try { fail("This should fail"); } catch(er:Error) {} } I suppose this one should fail a...

FlexUnit4 async test - asyncHandler's usage isn't clear

Hi, There is the doc page about FlexUnit4's async approach: http://docs.flexunit.org/index.php?title=Writing_an_AsyncTest Here is the concept that's confusing for me: // timer is a Timer instance set to tick once with a delay of TIMER_TIME. [Test(async)] public function testAsync() : void { var asyncHandler:Function = Async.asy...

How can I unit test Flex applications?

Flex is a client-side language and based on events. How can such events be mocked to allow unit testing? ...

How to use SequenceRunner with FlexUnit 4

In the FlexUnit wiki I've read about the very interesting SequenceRunner that was contributed by the Fluint folks. Now I am trying to run a test that is very similar to the example, however when executing the run() Method of the SequenceRunner instance, I get this exception: Cannot add asynchronous functionality to methods defined b...

Actionscript: Flexunit: unit testing existing actionscript project

I was reading this: http://stackoverflow.com/questions/366088/flexunit-with-pure-actionscript-project-in-flex-builder-3/3472839#3472839 I am trying to do option 2 in his question. I have an existing actionscript project. I created a flex project with flexunit 4 setup and it runs. I set the flex project to have an external source library...

Build and run FlexUnit from the command line

I am building an app using ActionScript3 with Flash Builder 4 as my IDE. The IDE supports a unit testing framework called "FlexUnit". I can build and run tests within the IDE, no problem. After much pain and suffering I figured out how to build the unit tests as a swf from the command line. I can point a browser or flash player at ...

Performance testing using FlexUnit

FlexUnit is quite an impressive framework for testing and with the new integration in Flash Builder 4 it's a no brainer to use it. However, I'm not sure why it's necessarily exclusive to just unit testing. In my opinion, I think the tools are great candidates for performance testing as well. It should also be mentioned that by performan...

Run a single test in Flash Builder?

I have been using Flash Builder to build my flex software and I am a TDD guy. I find it irritating that I have to run ALL my tests in order to run any tests. It causes friction in my TDD workflow. I really want to write a test, and run that test in isolation. I do this in .Net all the time (with TD.NET plugin), but I can't find a way...

flexUnitTasks error of "command not understood"

I use FlexUnitTasks-4.0.0.jar to generate report with ant, and the compile target is passed, and the testRunner swf file is made, but has some problem, the log is following: [flexunit] Receiving data ... [flexunit] Sending acknowledgement to player to start sending test data ... [flexunit] [flexunit] Stopping server ... [flexuni...

How to set up Charles proxy for standalone Flash player during FlexUnit integration tests?

I'd like to record the AMF traffic that happens during some of my Flex application unit tests. I am using Maven/flexmojos to compile the unit tests. I've installed Charles proxy and can get it to work from Firefox, but how can I get it to work from the standalone Flash player that flexmojos/FlexUnit invokes to run the integration tests...