beehive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Diephouse <>
Subject Re: Control Unit Testing
Date Tue, 26 Oct 2004 01:57:52 GMT

Thanks for the explanation of whats happenin behind the scenes.  As you 
can tell I am still ignorant as to the Beehive Way (TM).  And James, 
thanks for the links.  I will be looking over everything some more while 
I try to grep it all....

I am on the dev list as well.  Just thought I'd post here since I think 
I currently fall under "users" not developers. :-)
- Dan

Ken Tam wrote:

>Dan, are you on the beehive dev list?  We can have this conversation
>here, but it sounds like you'd get some value out of the content on the
>dev list too.
>There's an entire junit test suite for controls that you might want to
>take a look at -- it's rooted under controls/test and you can run it via
>"ant drt" in controls.  
>It sounds like you're interested in understanding what it means to be a
>controls client (ie be able to declare a control field with @Control and
>have it be initialized).  The infrastructure actually makes it pretty
>easy to be a control client:
>0) call the source file where you've got @Control declarations the
>"control client".
>1) If you process your control client "Foo" using apt, and have
>controls.jar on the apt classpath, then an annotation processor in
>controls.jar will execute and produce a helper class called
>2) FooClientInitializer has a static initializer method that takes an
>instance of Foo.  For each instance of Foo that you want initialized,
>call this method and pass the instance.
>Typically control clients won't be random Java files, but rather
>something meant to be run in some container.  The expectation is that
>the container infrastructure would do the work of calling these
>initializer helper classes.
>James Song has already sent out some links to how the test suite
>exercises these features.  Shout if you've got more questions!
>-----Original Message-----
>From: Dan Diephouse [] 
>Sent: Monday, October 25, 2004 1:25 PM
>To: Beehive Users
>Subject: Control Unit Testing
>Any tips for how to best unit test controls?  I am looking for how to 
>use the Beehive API but not finding a whole of information on it.  I 
>think I understand how controls work, but I'm more wondering about the 
>magic that goes on behind the scenes.  i.e. a 10000 ft overview of 
>Ideally I'd like to be able to declare a field in my unit test case like
>"@Control HelloControl hello" and make a unit test which fills in the 
>@Control fields.  Then I could run tests/assertions on the control.  Any
>tips on how one would do this?  Or if it even makes sense to do this?
>- Dan

Dan Diephouse
Envoi Solutions LLC

View raw message