Skip to main content
February 5, 2010
Answered

Hooking up FlexUnit

  • February 5, 2010
  • 1 reply
  • 751 views

Hello,

I've been reading the FlexUnit docs and playing with the FlexUnit4Turnkey project. Assuming I have an existing Flex/AIR application that I want to start writing tests against should I be creating a new Flex application that contains my unit tests which has a reference to the project I am testing so that I can instantiate those classes and call methods on them? I assume that I do not write all my unit tests directly in my actual application!

Also, is it possible to automate an Adobe AIR desktop application for UI testing?

Thanks

Kevin

This topic has been closed for replies.
Correct answer mlabriola

Kevin,

That's up to you but most people do put them in the same project. Unless you reference the tests somewhere in your application code (which would seem exceedingly unlikely) they won't be built into the final swf when you build your application, so it doesn't matter if they are in the same project.

Mike

1 reply

mlabriolaCorrect answer
Participating Frequently
February 5, 2010

Kevin,

That's up to you but most people do put them in the same project. Unless you reference the tests somewhere in your application code (which would seem exceedingly unlikely) they won't be built into the final swf when you build your application, so it doesn't matter if they are in the same project.

Mike

February 6, 2010

Thanks for the response. What I was able to do was create a separate project for testing, and then create project references to the various ActionScript libraries that my AIR application uses. So, my libraries are now shared between my AIR application and my Test application (also AIR) This allows me to test the guts of my AIR application. It also - IMO - encourages me to encapsulate anything that is not directly related to the UI of my AIR app into libraries so that I can write tests against them.

My next task is to figure out a UI automation framework. I found docs on Mercury QuickTest Professional, but I'm thinking it is probably fairly expensive. I'm not sure if there are any free ones out there.

Kevin

Participating Frequently
February 6, 2010

check out flexmonkey. great tool. cant beat the price.