buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Boisvert <>
Subject Re: Integration Tests + Unit Tests in the same project?
Date Wed, 29 Sep 2010 05:21:17 GMT
Hi Peter,

In an ideal world, setting up multiple test types would be a simple as

type1 = TestTask.define_task('test-type1')
type1.include [...]

type2 = TestTask.define_task('test-type2')
type2.include [...]


test.enhance [type1, type2]

However as it stands, the code makes several assumptions that there's only
one TestTask per project.   It's certainly doable but may require
non-trivial changes to the code.

Rhett's suggestion to use multiple projects and rebase them with :base_dir
works to a certain extent but may not work entirely if using the same test
framework several times because the same file ends up being used to check if
tests have been run.

My suggestion if you want to get things working quickly is to separate out
the different test types into different physical (sub)projects.  I don't
think you need to set up a full directory structure (e.g.
$subproject/src/test/...), you could have it such that only $subproject is
needed by setting up test.compile.from to ".".

If you can provide an example (ideally with simple/fake sources) that
illustrates your directory structure and needs, I can help getting multiple
test types working in a single project.


On Tue, Sep 28, 2010 at 8:20 PM, Rhett Sutphin <>wrote:

> Hi Peter,
> On Sep 28, 2010, at 8:16 PM, Peter Donald wrote:
> > Hi,
> >
> > I am in the process of converting a bunch of builds based on
> > ant/maven/rake to buildr. One of the patterns that I can not see how
> > to directly translate into buildr is the single project with multiple
> > test types within it. i.e. A project has integration and unit tests
> > both written in java and both stored in test hierarchy. It also has
> > ruby based integration tests sitting side by side the java test code.
> > AFAICS buildr is not really set up for this scenario. It seems that
> > for each project there can only be one test invocation, one test
> > framework and can not run parts at both integration testing time and
> > unit testing time. Is this correct?
> Yes.  Each buildr project can only have one test type (either integration
> or unit) and one test framework (junit, rspec, etc.).
> > Any suggestions on how to deal with this?
> I use a separate subproject for integration tests -- i.e., a subproject
> that only has tests in it and which depends on whatever module(s) I'm trying
> to integratedly test.  It might even be possible to have a subproject
> definition which, through the :base_dir option, executed tests which are
> physically alongside the unit tests in the parent project.  I haven't tried
> that, though.
> Rhett
> >
> > --
> > Cheers,
> >
> > Peter Donald

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message