Trevor,
Thanks for your reply. I sent my question too soon - when I ignore the error
and run the tests anyway, using RunAs > FlexUnit Tests from within FB,
everything is fine. FlexUnit generates a temporary MXML file which is identical
to the one bundled with the Apache tutorial, with one exception: the
Adobe-generated MXML file includes a port number attribute on the test runner
element:
<flexui:FlexUnitTestRunnerUI id="testRunner" portNumber="8765">
</flexui:FlexUnitTestRunnerUI>
Whereas the Apache tutorial version does not:
<flexui:FlexUnitTestRunnerUI id="testRunner" />
In any case, after running the tests, the error message disappears.
From your reply, it is good to know that the Apache SWCs will work in a CI
environment, since that is exactly what we will want to do eventually.
Peter
-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Thursday, May 29, 2014 11:44 AM
To: [email protected]
Subject: RE: FlexUnit: TestRunner mismatch with Adobe FB 4.7?
Peter,
I have not looked at the example you are attempting, but I can say that we see
that compile error when users attempt to use an MXML file that is autogenerated
by FlashBuilder. FB seems to prefer a custom test runner,
FlexUnitTestRunnerUI, that is (evidently) bundled. The problem is that the
tests will not compile (much less run) outside of FB. This is a major problem
when you want to run FlexUnit using the <flexunit> Ant task, say in a
continuous integration environment.
Because of this, I recommend that users write their MXML files for FlexUnit
tests manually, using the "flexUnitUIRunner" class (i.e. the type that is
included in the FlexUnit SWCs). Do not use the FlashBuilder generated MXML!
Regards,
Trevor
-----Original Message-----
From: Peter Swartwout (OSV) Peter.Swartwout.osv-at-fedex.com |Apache Flex
mailing lists/Example Allow| [mailto:[email protected]]
Sent: Wednesday, May 28, 2014 4:53 PM
To: Trevor Butler; [email protected]
Subject: FlexUnit: TestRunner mismatch with Adobe FB 4.7?
Hello,
I'm new to FlexUnit and trying to run the tutorial found here:
http://flex.apache.org/flexunit/tutorial/flexunit/Unit-1.html
I have FlashBuilder 4.7 Premium at work and I'm doing this on Windows 7 64-bit.
Following the tutorial's Unit 1, I can't run the tests because I get a
compile-time error "Type was not found or was not a compile-time constant:
FlexUnitTestRunnerUI".
Also, the build path of the project had to be adjusted after importing the
provided fxp file, since on my system I have:
C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64
Bit)\eclipse\plugins\com..adobe.flexbuilder.flexunit_4.7.0.349722\flexunitSwcs\4.5\locale\en_US\FlexUnitTestRunner_rb.swc
but the project is expecting:
C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64
Bit)\eclipse\plugins\com..adobe.flexbuilder.flexunit_4.7.0.349722\flexunitSwcs\4.5\locale\en_US\version4locale\
Thanks for any guidance.