Typically, you'd create a separate project that includes integration tests and then add the line,
test.using :integration to it, along with "integration.setup" and "integration.teardown" blocks that would, e.g., start/shutdown tomcat respectively. Does that help? alex On Thu, Aug 16, 2012 at 10:29 AM, Odelya Holiday <[email protected]>wrote: > Thanks > > But how can I tell buildr which tests are integration and which are simple > junit? > > In the build file I have more than project definition > > Thanks > > Odelya > > On Aug 16, 2012, at 8:23 PM, Alex Boisvert <[email protected]> > wrote: > > > You may want to take a look at the integration test feature: > > http://buildr.apache.org/testing.html#integration > > > > > > On Thu, Aug 16, 2012 at 7:06 AM, Odelya Holiday <[email protected]> > wrote: > > > >> Hi! > >> > >> I realized, that in buildr by default the order is like this: > >> > >> build all the projects > >> run tests on all the projects > >> package all the proejcts > >> > >> The thing is that I need to package the war before running the tests - > >> since they call my api war. > >> > >> My buildfile is as follows: > >> > >> desc 'Building engine project for engine and API' > >> define 'Engine' do > >> compile.with SPRING_CORE, > >> ACTIVATION,ANTLR,AOPALLIANCE,ASM,ASPECTJ > >> info "package engine jar" > >> package(:jar, :id=>"Engine") > >> end > >> > >> desc 'Building API project' > >> define 'MyBuild' do > >> # specify the artifact for plimus, twilio and floristone > >> since I > >> created it locally > >> plimus = artifact('plimus.com: > >> plimus:jar:1.0').from('/var/lib/selfdep/wsintegration.jar') > >> floristone = artifact('floristone.com: > >> floristone:jar:1.0').from('/var/lib/selfdep/floristone.jar') > >> twilio = artifact('twilio.com: > >> twilio:jar:1.0').from('/var/lib/selfdep/twilio.jar') > >> # install the artifact locally > >> install plimus > >> install floristone > >> install twilio > >> libs = > >> > AXIS_SAAJ,RESTFB,SEARCH,SEARCH_HIBERNATE,SLF4J,SLF4J_LOG4J,STAX_API,TWITTER4J_CORE,WSDL4J > >> compile.with libs > >> war = package(:war, :id=>"MyBuild") > >> war.with :libs => libs > >> package.enhance do > >> sh "sudo " + tomcatlocation + > "/bin/shutdown.sh" > >> rescue nil > >> cp war.to_s, buildrwar > >> sh "sudo " + tomcatlocation + "/bin/startup.sh" > >> end > >> end > >> > >> I would like the package.enhance to happen before invoking the tests > >> of Engine and the tests of the MyBuild (the api) so it could check it > >> while tomcat is running. > >> > >> How can I do it? > >> -- > >> Odelya > >> >
