You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Alex Huang <Al...@citrix.com> on 2013/08/06 23:59:34 UTC

TEST or integration test?

I noticed that some of our unit tests are run in integration-test stage of maven.  Shouldn't that be in the test phase?  Does anyone know why it's set at integration-test?  I based this observation on the surefire plugins are set for integration-test phase.  Note the following.

./engine/orchestration/pom.xml-            <phase>integration-test</phase>
./engine/storage/integration-test/pom.xml-            <phase>integration-test</phase>
./engine/storage/volume/pom.xml-            <phase>integration-test</phase>
./plugins/storage/image/default/pom.xml-            <phase>integration-test</phase>
./plugins/storage/image/sample/pom.xml-            <phase>integration-test</phase>
./plugins/storage/image/swift/pom.xml-            <phase>integration-test</phase>
./plugins/storage/volume/default/pom.xml-            <phase>integration-test</phase>
./plugins/storage/volume/sample/pom.xml-            <phase>integration-test</phase>
./plugins/storage/volume/solidfire/pom.xml-            <phase>integration-test</phase>

I think integration test is probably just the smoke test that Prasanna has written.  We should enforce that in the maven build.  Does that make sense?

--Alex

Re: TEST or integration test?

Posted by Prasanna Santhanam <ts...@apache.org>.
The integration-test is a lifecycle in maven.[1] Surefire plugin
provides a goal to maven where you can hook-in integration tests. The
weird thing I find about maven calling it an 'integration test' is
that it comes before the install phase. We only put together all our
modules and generate the cloudstack war at the end of the install
phase.

I understand integration-test as anything that runs against a group of
environment/systems. Perhaps we're not doing it right as the maven
world would have it.

[1] http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Lifecycle_Reference

On Wed, Aug 07, 2013 at 01:15:33AM +0000, Alex Huang wrote:
> So is the difference between test and integration-test is that the code access db?  I've noticed a great deal of test code that's been disabled by hand as well.  A proper test should just mock the db layer.  
> 
> To me it would make sense if we use an in memory db like derby for the unit tests.
> 
> --Alex
> 
> > -----Original Message-----
> > From: Min Chen [mailto:min.chen@citrix.com]
> > Sent: Tuesday, August 6, 2013 3:58 PM
> > To: dev@cloudstack.apache.org
> > Subject: Re: TEST or integration test?
> > 
> > For /engine/storage/integration-test, I know that those tests are TestNG
> > test cases, requiring DB existence.
> > 
> > Thanks
> > -min
> > 
> > On 8/6/13 2:59 PM, "Alex Huang" <Al...@citrix.com> wrote:
> > 
> > >I noticed that some of our unit tests are run in integration-test stage
> > >of maven.  Shouldn't that be in the test phase?  Does anyone know why
> > >it's set at integration-test?  I based this observation on the surefire
> > >plugins are set for integration-test phase.  Note the following.
> > >
> > >./engine/orchestration/pom.xml-            <phase>integration-test</phase>
> > >./engine/storage/integration-test/pom.xml-
> > ><phase>integration-test</phase>
> > >./engine/storage/volume/pom.xml-
> > ><phase>integration-test</phase>
> > >./plugins/storage/image/default/pom.xml-
> > ><phase>integration-test</phase>
> > >./plugins/storage/image/sample/pom.xml-
> > ><phase>integration-test</phase>
> > >./plugins/storage/image/swift/pom.xml-
> > ><phase>integration-test</phase>
> > >./plugins/storage/volume/default/pom.xml-
> > ><phase>integration-test</phase>
> > >./plugins/storage/volume/sample/pom.xml-
> > ><phase>integration-test</phase>
> > >./plugins/storage/volume/solidfire/pom.xml-
> > ><phase>integration-test</phase>
> > >
> > >I think integration test is probably just the smoke test that Prasanna
> > >has written.  We should enforce that in the maven build.  Does that
> > >make sense?
> > >
> > >--Alex

-- 
Prasanna.,

------------------------
Powered by BigRock.com


RE: TEST or integration test?

Posted by Alex Huang <Al...@citrix.com>.
So is the difference between test and integration-test is that the code access db?  I've noticed a great deal of test code that's been disabled by hand as well.  A proper test should just mock the db layer.  

To me it would make sense if we use an in memory db like derby for the unit tests.

--Alex

> -----Original Message-----
> From: Min Chen [mailto:min.chen@citrix.com]
> Sent: Tuesday, August 6, 2013 3:58 PM
> To: dev@cloudstack.apache.org
> Subject: Re: TEST or integration test?
> 
> For /engine/storage/integration-test, I know that those tests are TestNG
> test cases, requiring DB existence.
> 
> Thanks
> -min
> 
> On 8/6/13 2:59 PM, "Alex Huang" <Al...@citrix.com> wrote:
> 
> >I noticed that some of our unit tests are run in integration-test stage
> >of maven.  Shouldn't that be in the test phase?  Does anyone know why
> >it's set at integration-test?  I based this observation on the surefire
> >plugins are set for integration-test phase.  Note the following.
> >
> >./engine/orchestration/pom.xml-            <phase>integration-test</phase>
> >./engine/storage/integration-test/pom.xml-
> ><phase>integration-test</phase>
> >./engine/storage/volume/pom.xml-
> ><phase>integration-test</phase>
> >./plugins/storage/image/default/pom.xml-
> ><phase>integration-test</phase>
> >./plugins/storage/image/sample/pom.xml-
> ><phase>integration-test</phase>
> >./plugins/storage/image/swift/pom.xml-
> ><phase>integration-test</phase>
> >./plugins/storage/volume/default/pom.xml-
> ><phase>integration-test</phase>
> >./plugins/storage/volume/sample/pom.xml-
> ><phase>integration-test</phase>
> >./plugins/storage/volume/solidfire/pom.xml-
> ><phase>integration-test</phase>
> >
> >I think integration test is probably just the smoke test that Prasanna
> >has written.  We should enforce that in the maven build.  Does that
> >make sense?
> >
> >--Alex


Re: TEST or integration test?

Posted by Min Chen <mi...@citrix.com>.
For /engine/storage/integration-test, I know that those tests are TestNG
test cases, requiring DB existence.

Thanks
-min

On 8/6/13 2:59 PM, "Alex Huang" <Al...@citrix.com> wrote:

>I noticed that some of our unit tests are run in integration-test stage
>of maven.  Shouldn't that be in the test phase?  Does anyone know why
>it's set at integration-test?  I based this observation on the surefire
>plugins are set for integration-test phase.  Note the following.
>
>./engine/orchestration/pom.xml-            <phase>integration-test</phase>
>./engine/storage/integration-test/pom.xml-
><phase>integration-test</phase>
>./engine/storage/volume/pom.xml-
><phase>integration-test</phase>
>./plugins/storage/image/default/pom.xml-
><phase>integration-test</phase>
>./plugins/storage/image/sample/pom.xml-
><phase>integration-test</phase>
>./plugins/storage/image/swift/pom.xml-
><phase>integration-test</phase>
>./plugins/storage/volume/default/pom.xml-
><phase>integration-test</phase>
>./plugins/storage/volume/sample/pom.xml-
><phase>integration-test</phase>
>./plugins/storage/volume/solidfire/pom.xml-
><phase>integration-test</phase>
>
>I think integration test is probably just the smoke test that Prasanna
>has written.  We should enforce that in the maven build.  Does that make
>sense?
>
>--Alex