incubator-cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chip Childers <>
Subject Re: [DISSCUSS][Unit Test] About class-level unit test
Date Wed, 19 Dec 2012 16:04:55 GMT
On Thu, Dec 13, 2012 at 9:51 PM,
<> wrote:
> Hi all
> I am a new one want to have some contribution for this community.
> Recently, I was tracing source code and write some plugin for cloudstack.
> But  it's very difficult for debug and testing in cloudstack environment.
> Because cloudstack's IoC is write by componentLocator, I cannot write unit test by something
like  @RunWith(SpringJunit4ClassRunner.class)
> Although  , I have seen Unit test 101 in (
> I want to test against all or most of the components, should I do this using unit testing
> No.  Unit testing is for specific testing to force issues to come up early.  If you need
to entire components.xml or components-premium.xml for your tests,
> what you really need is to start a server and have a predefined set of testcases run
as the web client.  That's not part of the unit testing.
> We need to develop other means to do that.  Once completed, we'll make this known on
this page.
>  But it make no sense to me.
> While  I google it , find some interest topic about unit test for cloudstack (
> Is anyone can share this slide to me? Or where can I find further information?

There really weren't any slides.  It was supposed to be a group of
folks writing more unit tests, which some did.  In the end, it became
a junit / mockito 101 discussion as well.  Again through, no slides.

Any help / patch submissions that add more unit tests to the project
are VERY appreciated.  Your points about what a proper unit test
should do are valid, and have been generally agreed on via this email
list.  If you'd like to help, take a class that's simpler and feel
free to write unit tests for it.  We've been using Mockito where
required, so feel free to use it if necessary.

View raw message