2

I have some software classes(library) to run commands on any mxml file. These classes(library) are wrapped in a SWC file. This SWC file is referenced by any sample mxml application (by adding as SWC file). My problem is that I want to test these software classes(library) against my sample mxml file using FlexUnit. That is, I should test methods run by software classes on the mxml file.

razlebe
  • 7,134
  • 6
  • 42
  • 57
user344722
  • 21
  • 2
  • Can you clarify more about what you're trying to do? Are these functions literally changing the text of the MXML files? IF so, you could probably just read the text of the edited file and see if it's what you expect after running your "commands". If not, please clarify exactly what you mean. – Amy Blankenship Dec 07 '11 at 13:57

1 Answers1

1

If you are truly doing unit testing, then you should be unit testing the functionality of the mxml files only, and not the integration of two together.

Set up flexunit to test the functions on the mxml file and use a mocking library (like ASMock to mock the library classes. You can then script and assert that the functionality in your mxml file is behaving as specced.

If you wish to do integration/functional tests, you may want to look at using FlexMonkey. It will drive and press buttons for you and allow you to assert various behavior/properties.

badunk
  • 4,310
  • 5
  • 27
  • 47