There is already one 
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Unit+Testing+101 and 
also 
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Unit+Testing+with+JUnit+and+Spring
Also you can look at the some of the existing unit tests.

> -----Original Message-----
> From: Rajesh Battala [mailto:rajesh.batt...@citrix.com]
> Sent: Friday, April 12, 2013 8:32 PM
> To: dev@cloudstack.apache.org
> Subject: RE: Master broken
> 
> +1 It would be very nice to see a wiki page how to write unit test. It would 
> be
> great help.
> 
> Thanks
> Rajesh Battala
> 
> > -----Original Message-----
> > From: Chip Childers [mailto:chip.child...@sungard.com]
> > Sent: Friday, April 12, 2013 7:57 PM
> > To: dev@cloudstack.apache.org
> > Subject: Re: Master broken
> >
> > On Thu, Apr 11, 2013 at 05:57:01PM -0700, Kelven Yang wrote:
> > > These issues are caused by that some of components are not really
> > > mocked, instead, they are loaded directly main source.
> > >
> > > One of the benefits from Spring is that it integrates with Mokito
> > > nicely, all we need is to probably have a base test configuration
> > > that returns all mocked DAOs or other common components and then
> > > have all unit test purely written against mocked components.
> > >
> > > We need to finalize the way to write Java unit test so that everyone
> > > can follow to reduce the frequency/prevent these from happening.
> > > I'll find some time to update the Unit-test guideline document in
> > > wiki, cleanup things in this area and re-enable all unit tests in the 
> > > build.
> >
> > +1 to this...  that would be great to get sorted out Kelven!

Reply via email to