Different behaviour between air runner and ant runner

4 views
Skip to first unread message

conrad.w...@googlemail.com

unread,
Apr 28, 2009, 4:24:11 AM4/28/09
to Fluint Discussions
After converting from flexunit to fluint I had a whole suite of tests
that worked under the fluint ant runner and fluint air runner.

None of these tests used the fluint 'facade' for component life cycle
aware testing.

This morning I converted one of these tests to use the component life
cycle: In essence I used to have

override protected function setUp():void
{
_bubble = new ChatBubbleComponent();
}


and now I have

override protected function setUp():void
{

_bubble = new ChatBubbleComponent();
_bubble.addEventListener(FlexEvent.CREATION_COMPLETE, asyncHandler
( pendUntilComplete, 1000 ), false, 0, true );
addChild(_bubble);
}

override protected function tearDown():void
{
removeChild(_bubble);
_bubble = null;
}


And now the tests run perfectly in the ant test runner, but in the air
test runner I get the following error in my test output xml.

Setup or Teardown Failed for this TestCase. Method is invalid. Review
Testcase for stackTrace information
null


This is frustrating because it means that our ci builds do not match
our local builds - does anybody have a clue what is going on?

Thanks

conrad.w...@googlemail.com

unread,
May 1, 2009, 6:35:30 AM5/1/09
to Fluint Discussions
So any ideas? Is this list dead? Do I have to revert to FlexUnit
because Fluint is not up to it?

On Apr 28, 4:24 am, "conrad.winches...@googlemail.com"

Brian

unread,
May 1, 2009, 9:57:04 AM5/1/09
to Fluint Discussions
@conrad - Sorry it took a few days to get back with you, the burden of
OSS I guess :)

To speak to our current implementation, the ant tasks make a command
line call the air test runner, it's the only abstraction the ant tasks
perform. The airtestrunner has a dependency on the fluint.swc which
your tests are built against, calling the same methods as if you
created a FlexTestRunner. So each component in fluint reuses the same
code you write your tests with, so I'm confused on how the ant task
which calls the air runner would provide different output than calling
the air runner from the command line directly. Am I misunderstanding
your question?

Looking over your code, it looks correct. Can you confirm that the
same module SWF is being run against your ant script and air test
runner? This may be a bug with the XML output not showing the stack
trace from the setUp/tearDowns method however. To confirm this, can
you run the airtestrunner without the headless argument and see if the
visual runner give you debugging output? Let me know what you can
find out and we'll figure out what's going on.

-Brian

On May 1, 6:35 am, "conrad.winches...@googlemail.com"

conrad.w...@googlemail.com

unread,
May 2, 2009, 10:40:52 AM5/2/09
to Fluint Discussions
Good news - I am away from the office till Tuesday, will let you know
my findings then.

Conrad

conrad.w...@googlemail.com

unread,
May 10, 2009, 2:45:51 AM5/10/09
to Fluint Discussions
We found out the cause of the problem. We use StyleManager.loadTheme
to load a runtime theme. We could not get the AIR app to easily load
the theme during test runs, that was the cause of the fail.

HOWEVER - we have moved to flexunit 4 to run our fluint tests and this
solves the problem - very cool.

OT: Can anybody tell me how to load a local filebased theme at runtime
from air?

On May 2, 3:40 pm, "conrad.winches...@googlemail.com"

Brian

unread,
May 10, 2009, 10:23:06 AM5/10/09
to Fluint Discussions
@conrad - Thanks for flushing this out. If you find out that this is
a limitation of AIR, just let me know and I'll add it to the wiki
under gotchas for the AIRTestRunner.

-Brian

On May 10, 2:45 am, "conrad.winches...@googlemail.com"
Reply all
Reply to author
Forward
0 new messages