Some thoughts:
1. You might try experimenting with the forkMode setting for Surefire.
Ant's junit task defaults to perTest, but the default for Surefire is
once. Poorly written tests sometimes rely on the perTest behavior,
but well-written tests should be able to run with once (IMHO). For
that matter, Surefire isn't really doing anything particularly special
as a unit test runner, so if certain tests won't run, that smells.
2. Here's a plugin configuration we use to generate old junitreport HTML
files for a data gathering tool we still have to support:
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-antrun-plugin/artifactId
executions
execution
idjunitreport/id
phasetest/phase
configuration
tasks
junitreport todir=target/surefire-reports
fileset dir=target/surefire-reports
include name=TEST-*.xml /
/fileset
report todir=target/surefire-reports /
/junitreport
/tasks
/configuration
goals
goalrun/goal
/goals
/execution
/executions
dependencies
dependency
groupIdant/groupId
artifactIdant-junit/artifactId
version1.6.2/version
/dependency
/dependencies
/plugin
This relies on the surefire plugin running the tests and finding the xml
test results in the surefire-reports directly. You should be able to
insert your own Ant junit task (and configure Surefire to skip tests),
if necessary, and modify the rest appropriately.
Chris
-Original Message-
From: Sommers, Elizabeth [mailto:[EMAIL PROTECTED]
Sent: Friday, 03 November, 2006 10:17
To: Maven Users List (E-mail)
Subject: replace surefire with ant task
I want to replace the surefire tests with the ant junit
tests. I also want to run ant junitreport instead of the
surefire report. Does anybody have a way to do this? Many
of our tests won't run under surefire, others fail when they
shouldn't. Excluding tests is not an option.
Thanks
Liz Sommers
[EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]