On Tue, Jun 07, 2016 at 12:09:41PM -0500, Tim Donohue wrote:
> As far as I'm aware, that's just how a Maven test runs. It automatically
> will try to run tests in all modules, but it only will execute ones that
> it finds. So, most modules will report that no tests were found. I'm
> unaware of any way to change that behavior in Maven (if you know of one,
> let us know).
That's right: phases 'test' and 'integration-test' (and several other
test-related phases) are part of the standard Maven lifecycle and will
be run unless suppressed somehow. I think that we could selectively
disable these phases for projects that currently have no tests, but I
would rather that we started writing good tests for those projects.
Some good work was started in dspace-api, which can be extended to
other projects without a lot of effort. It just hasn't been done.
What we have now is frameworks with some quite useful tests included,
and a collection of newer tests that grows as individual developers
add to it for their own use. I'm less familiar with the test setup in
dspace-services, which was developed separately.
We could use some more mocking to make some of our unit tests more
lightweight (and a lot faster).
> Also, be aware that we have Unit / Integration Tests disabled by default
> in our Maven POM settings. So, to actually run tests, you need to apply
> a flag to enable them:
>
> * "-Dmaven.test.skip=false" will enable Unit Tests to run (via Maven
> Surefire Plugin)
> * "-DskipITs=false" will enable Integration Tests to run (via Maven
> Failsafe Plugin)
Just to make things *really* confusing, I have the following in my
~/.m2/settings.xml:
<profiles>
<profile>
<id>defaults</id>
<properties>
<maven.test.skip>false</maven.test.skip>
<skipITs>false</skipITs>
</properties>
</profile>
</profiles>
<activeProfiles>
<activeProfile>defaults</activeProfile>
</activeProfiles>
--
You received this message because you are subscribed to the Google Groups
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.