Unit Test help on new Robotlegs book
Hello,
I wanted to run the unit tests included in the new Robotlegs book by Stray and Joel, but am having difficulties. I am using FlashBuilder 4.5 and when I try to run the FlexUnit tests on the PersonalKanBan app - the compiler starts to complain about textDecoration on Labels all of a sudden. If I remove the libraries that are included (automatically) when you try to run unit tests - then the compiler error goes away.
Can anyone give me any pointers?
Thanks
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Joel Hooks on 04 Sep, 2011 04:02 AM
So it works if you remove the included libs? I never ran the tests in Flash Builder, which is an oversight on my part. I used IntelliJ
2 Posted by Uno Dos on 04 Sep, 2011 07:34 AM
Sorry for not clarifying: no, I could not get the tests to run. When the libs are included it results in a compiler error. It would be really helpful for me (and I'm sure others) if you could document the steps required to get FlexUnit4 tests running in your project and AsUnit tests running in Stray's project. Even if it's from the command line. For those unfamiliar with testing, I don't know where to start tinkering.
Thank you
Support Staff 3 Posted by Stray on 04 Sep, 2011 08:30 AM
Hi Uno Dos,
Sorry about that! I use project sprouts and the command line, so IDE compiling is all a bit of a mystery to me. Thanks for pointing it out.
Here's the mxmlc command to run the mosaic project tests (from the project folder):
Outputs:
Then, to debug in command line:
That should run the tests, and in my suite all 574 tests are passing.
I actually run the tests from a project sprouts rake file - the version of project sprouts I use is 0.7 - it's quite a detailed process to get it up and running, but if you want to take that route then I'm happy to send my sprouts files (you'd need to install manually I think).
Meanwhile - Joel could you create some Ant build files?
Stray
Support Staff 4 Posted by Joel Hooks on 04 Sep, 2011 05:27 PM
The problem with the FlexUnit integration is that there appears to be some dependency on MX components in the FlexUnit libs that Adobe supplies.
File>Properties>Flex Build Path>MX + Spark
Joel Hooks closed this discussion on 04 Sep, 2011 05:27 PM.