Attached tests

Hi folks…

To test flex applications, flex-mojos compile and run a SWF file. Nothing new on that.

But, under certain circumstances (i.e. on multi-modular projects) you need to get access to some classes used to test your module A in order to test module B. One issue was filed asking that, check here.

To do that, you need to add a new mojo to your project:

<build>
  <plugins>
    <plugin>
      <groupId>info.flex-mojos</groupId>
      <artifactId>flex-compiler-mojo</artifactId>
      <executions>
        <execution>
          <id>package</id>
          <goals>
            <goal>test-swc</goal>
          </goals>
        </execution>
      </executions>
    </plugin>
  </plugins>
</build>

This plugin will compile your test folder into a SWC file. This SWC will be installed at maven repository under test classifier.

You can read more on Maven Guide to using attached tests.

Nice holiday to US buddies.

VELO

2 Responses to “Attached tests”

  1. Bookmarks about Flex Says:

    […] - bookmarked by 3 members originally found by 0o on July 04, 2008 Attached tests http://blog.flex-mojos.info/2008/07/04/attached-tests/ - bookmarked by 1 members originally found […]

  2. Flex-Mojos » Flex-mojos 2.0-alpha2 Says:

    […] changes: * Now is possible to pack tests into SWC. Read more here. * Improved flex-compiler-mojo documentation, specially adding usage hints for complex parameters. […]

Leave a Reply