felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Karasulu <aok...@bellsouth.net>
Subject Re: [testing] Automated (in situ) testing
Date Wed, 16 Aug 2006 20:20:08 GMT
Peter Neubauer wrote:
> Hi Alex,

Hi Peter,

> same question here. Are you trying to do integration testing of
> bundles against each other from an JUnit testcase to be executed at
> compile time in Maven, 

Sort of.  I'll take it that you mean "maven test phase" when you refer 
to compile time.  This happens right before the packaging phase.  I'd 
say yes to this question.

or are you trying to create an environment in
> order to be able to self test production bundles, maybe in some
> sandbox?

No I want everything integrated into the build.  If an environment needs 
to be assembled the build should be able to do it while running one of 
these integration tests.

> Both scenarios are very interesting, the second even more in order to
> deliver runtime testable components, but I guess you mean the first?

Integration tests are tough to automate especially when you have 
external things you need like databases and LDAP servers ;).  Setting up 
such an environment is possible but not so easy to do in again an 
automated fashion.

Sometimes I like to trigger these kinds of tests using a profile 
directive in maven.  Because they require external resources to be setup 
I do not want these tests to prevent a build when those resources are 
not there.

Most of the time however you can stub out these things and still have a 
partial integration test.


> On 8/16/06, Richard S. Hall <heavy@ungoverned.org> wrote:
>> This sounds pretty interesting to me, of course, I am a testing newbie
>> so that may not mean much. We probably need feedback from the testing
>> gurus out there.
>> This doesn't sound exactly like unit testing, but leans more toward
>> integration testing, right? Perhaps this mechanism could also become the
>> basis for integration testing too.
>> Thoughts?
>> -> richard
>> Alex Karasulu wrote:
>> > Hi all,
>> >
>> > I'm going to take another stab at this one. But let me take a step
>> > back to the requirements level.
>> >
>> > After writing a bundle containing a service, I'd like to write some
>> > tests and have maven run them against my bundle in place within Felix.
>> > Of course, all dependent bundles would need to be installed so the
>> > target bundle being tested can be installed and started.  I want this
>> > to happen as part of the test life-cycle of Maven.  So to "mvn
>> > install" a bundle, it's (in situ) tests must pass.
>> >
>> > First let me stop and ask if people are really interested in having
>> > this capability?
>> >
>> > Basically I'm looking for an OSGi bundle testing framework which
>> > easily integrates with Maven and it's compile-test-install etc
>> > life-cycle.  We used to have this over at Avalon for the Pheonix
>> > container; it was called punit.  It would be nice to have something
>> > analogous to it here at Felix, so we can automate in situ testing of
>> > OSGi bundles.
>> >
>> > Alex
>> >
>> >

View raw message