Skip to main content
August 15, 2010
Question

Cairgorm 3 sample applications - errors in unit tests

  • August 15, 2010
  • 2 replies
  • 1299 views

After the last update the sample applications started to work - they now even show images.

But the unit tests for Commands are reporting errors on my machine:

TypeError: Error #1034: Type Coercion failed: cannot convert []@56443a9 to XMLList.
at asmock.integration.flexunit::ASMockClassRunner/withBeforeClasses
at org.flexunit.runners::ParentRunner/classBlock(ParentRunner.as:221)

etc...

As I am just starting to explore unit testing, I do not know how to debug it.

Can someone help me?

Thanks, Zdenek M

This topic has been closed for replies.

2 replies

Adobe Employee
August 19, 2010

The tests work for me after removing the classpath changes and app added by "Execute Flex Unit tests".

BUT:

     How can run the tests with maven?

Thanks

     J.

August 25, 2010

See https://docs.sonatype.org/display/FLEXMOJOS/Running+unit+tests.

Zdenek

Adobe Employee
August 26, 2010

Thanks, but I'm aware of the flex unit documentation. But since the sample requires to run the tests with a custom test runner, the question arises:

How to execute the custom test runner in maven and how to evaluate it's results?

That is THE question, not how flex mojos can execute standard flex unit tests.

Adobe Employee
August 16, 2010

Hi,

Could you confirm that you are running the unitTests using the InSyncBasicTestRunner.mxml? Also make sure that you don't have another version of FlexUnit4 on your classpath (Project->Properties->Flex Build Path) as the one shipped with the latest version of Flash Builder may conflict with the version of ASMock we are using at this time.

Let me know if you are still experiencing issues with the test suite.

Best,

Nicolas

August 17, 2010

I tried to run unit tests by right-click on project and choosing Run As >FlexUnit Tests, and also by opening InSyncBasicTestRunner.mxml and choosing Run InSyncBasicTestRunner button. The results are the same.

I am using Flash Builder 4.1 with flexsdk 4.1.0.16076 and flexunit 4.0.0.272416.

The problem is ASMock version in the repository - when I updated ASMock libriraries to version 1.0 RC, the errors disappeared and tests passed.

Zdenek M