The flex-mojos project supports unit testing of Flex code, but it doesn’t use Maven’s default surefire plugin for running tests. As a result, you need to make a slight tweak to your pom.xml file:
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<configuration>
<reportsDirectory>${project.build.directory}/test-reports</reportsDirectory>
</configuration>
</plugin>
</plugins>
</reporting>
UPDATE – With the Flex Mojos 1.0 release, the output directory for FlexUnit tests has changed. It’s now surefire-reports, so you can simply include the surefire-report plugin in your pom.xml file without any configuration:
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
</plugin>
</plugins>
</reporting>