Using Flexunit 4 From a Flex Project

Hi all,

I am trying to use Flxunit 4 in a Flex module that I have created from scratch.

It seems from various blogs and posts that all I have to do is make sure that a 'Flexunit swc' is a dependency of my module. So I make a libs folder in the module, add the Flexunit 4.1rc1 swc to that folder and then add it as a 'single entry library' dependency for the project. I am then able to get command completion on flexunit classes etc... But unfortunately I still get a 'You need a flexunit swc as a depenency' error when I try to run unit tests in the ide.

Does anybody know what the actual procedure is for setting this up?

Thanks

Conrad Winchester

5 comments

Is the package structure containing your test class marked as a "test source root" in your module configuration?

0

Thank you for feedback, I've opened respective issue: http://youtrack.jetbrains.net/issue/IDEA-59488
As a workaround you may use "Flex Based" distribution of FlexUnit 4.1.

By the way using "test source roots" is not a must though very much recommended.
One more note: you don't have to copy flexunit swc under libs in project, it may reside anywhere on your hard drive. And you don't have to rename it to exactly flexunit.swc, library name doesn't matter at all, IDEA just looks if flexunit classes are available in classpath.

0

Thanks, that worked perfectly - really nice that it is so easy to choose which flex unit library I want to use.

0

where do I get the FU4 swc, adobes website offers all this beta turnkey stuff I don't want

0

Please sign in to leave a comment.