Skip to main content
May 18, 2010
Question

Testing swc and mxml code

  • May 18, 2010
  • 1 reply
  • 1923 views

Hi,

I have some software classes to run commands on any mxml file.
These classes 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 against my sample mxml file. That is, I should test methods run by software classes on the mxml file.

How can I accomplish this?

Thanks,
Pradeep

This topic has been closed for replies.

1 reply

Participating Frequently
May 21, 2010

i am not sure that i completely understand and dont want to answer incorrectly. could you post a few code snippets so this example can be more concrete?

May 21, 2010

Well,

I am writing an agent to test Flex apps, similar to QTP,FunFX and FlexMonkey.

So obviously this agent (library compiled to a SWC) can be linked and used to test any mxml project.

I've developed some part of the agent and have a sample mxml file with all the components thrown in.

The mxml file doesnt lead to any other file...it has just components to be tested.

So I want to test my agent against this mxml file, for test driven development(TDD).

I want to create a separate project to test my agent(library) and the sample mxml file.

How can I achieve this?

Thanks,

Pradeep.

PS: The library is a bit too big and complicated to be provided as a code snippet.

Participating Frequently
May 21, 2010

Basically, you would just link your library into a test project. Instantiate your MXML component in the [Before] block (make sure you use the UIComponentImpersonator and the async options to let it start up. Then write tests.

Mike