For a more build tool agnostic approach:

Have a test resource that gets the connection details filtered in

Then in your database tests, start each one with a Junit4 Assumption like

assumeThat(credentialsFromTestResource, is(not(nullValue()));

And now you can run all tests from your IDE too

On Monday, 15 September 2008, Dennis Lundberg wrote:

A totally different way to do it is to run your DAO test cases against
an embedded database like HSQLDB or perhaps Derby. We use HSQLDB for
this with at file based database that gets created locally when the
tests are run.

I know this doesn't answer your question, I'm just thinking outside the
box here :-)

Haikal Saadh wrote:
Hi all.

I'm trying to figure out what the best way is to exclude DAO tests. The
reason for this being that not everyone who checks a project out may have
the credentials necessary to connect to the database.

At the moment, I have two profiles like this:


This works fine, but it just seems like it's bloating the pom.

I could move the DAO tests to a new module, but then, I'd have two different
sets of cobertura/surefire reports for the same thing.

Any different approaches I can try? Or is this pretty much it?


Dennis Lundberg

To unsubscribe, e-mail: users-unsubscribe@maven.apache.org <javascript:;>
For additional commands, e-mail: users-help@maven.apache.org<javascript:;>

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 9 of 13 | next ›
Discussion Overview
groupusers @
postedSep 15, '08 at 12:41a
activeNov 25, '12 at 12:13a



site design / logo © 2021 Grokbase