On Fri, Jul 15, 2011 at 12:03:51PM -0500, Tim Donohue wrote:
> 
> MarkW & MarkD,
> 
> Few minor thoughts inline...
> 
> On 7/15/2011 11:49 AM, Mark Diggory wrote:
> > Mark,
> >
> > I've been having a similar issue with some of the dspace-core work
> > I've been attempting.  I'd like to have the the scaffolding exist in
> > dspace-api, but be able to fire it up within
> > dspace-core/impl/src/test/ for locally testing the new Domain Model.
> > But alas, I ran into the same issues that you did.  I think if we all
> > were to work together, we might be able to get this into a state that
> > it woks across modules...
> >
> > Issue 1: the configuration is duplicated inside
> > "dspace-api/src/test/resources for an entire dspace instance and is
> > not kept uptodate with the existing dspace dir, we need this to not be
> > the case.
> 
> +1 we need to fix this. :)  It's obviously already well out-of-date each 
> time we move around configs (as we've been doing in preparation for 1.8).
>
>
> > Issue 2: dspace-api test need to be released as an artifact to the
> > maven repo so taht they can be retrieved as a dependency for other
> > modules.
> 
> +1 Yes, if we released dspace-api test, then you could add it as a 
> dependency to other modules rather easily.  For example, I've been 
> playing around with DSpace Services a bit, and since 
> 'dspace-services-impl' releases its tests as an artifact, I can add them 
> as a dependency as follows:
> 
>      <dependency>
>        <groupId>org.dspace</groupId>
>        <artifactId>dspace-services-impl</artifactId>
>        <version>2.0.3</version>
>        <type>test-jar</type>
>        <scope>test</scope>
>      </dependency>
> 
> Again, this works because Maven Central actually has a 
> 'dspace-services-impl-2.0.3-tests.jar' artifact. If we did a similar 
> thing for dspace-api, then we could similarly define it as a dependency.
> 
> http://repo2.maven.org/maven2/org/dspace/dspace-services-impl/2.0.3/

Well, that certainly beats copying a pile of test classes and
resources N times.  I feared this was intended, since the framework
used to be a module and then got tucked into dspace-api.

> > Issue 3: the way the tests are disabled right now actually causes
> > problems with (Issue 1) its probably wise to not disable testing by
> > default.

I've played around with a small patch to the dspace-parent POM, to make
testing dependent on the presence of a file (development.flag) instead
of remembering to add -P \!skiptests all the time.  Useful?

> I wonder if there's a way we can just "auto-build" a test DSpace 
> directory at the point of Unit Testing? Not sure how hard that is though.

It probably comes down to binding to the process-test-resources phase
some plugin that knows how to build our test environment.  I haven't
yet worked out how people discover the existence of "plugin to do X".
We could write one if there isn't anything that will do.  Maybe
assembly is where to look, since it's concerned with copying lots of
stuff around into places where you want it.

Hmmm.  We need to do whatever 'mvn assembly:assembly' and/or 'ant
fresh_install' do to turn the configuration files in dspace/config,
dspace-api/src/main/resources, etc. into the target config directory
tree, filtering dspace.cfg for the test environment instead of the
target environment.

-- 
Mark H. Wood, Lead System Programmer   mw...@iupui.edu
Asking whether markets are efficient is like asking whether people are smart.

Attachment: pgp7j1qT6nTR6.pgp
Description: PGP signature

------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
Dspace-devel mailing list
Dspace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to