You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by B Prakash <bp...@hotmail.com> on 2016/01/19 04:56:53 UTC

Help with JUnits

Hi,


    Please can someone help me with identifying and amending junits for UserVmManagerImpl.commitUserVm?  I see a test class called UserVmManagerTest but I dont see a good junits coverage here.  Also link in the 'Developer > Testing > Unit testing with JUnit and Spring' doesnt give out lot of details on junits.

  1.  Am I looking at the right place for junits for the class UserVmManagerImpl.commitUserVm?
  2.  Is there any other link that provides more details on JUnits?
  3.  Any document or resource explaing cloudstack JUnit implementation in greater detail would be of great help.
  4.  If I want to track junit of this class, how do I track and execute them?


Regards,

Prakash

Re: Help with JUnits

Posted by B Prakash <bp...@hotmail.com>.
Ok.  I have extended rootdiskresize functionality for xenserver.  It was an existing KVM implementation and I extended it to include xenserver.  I was also hoping to reuse its junits but couldnt find.

Please let me know if you are aware of any means of finding junits for UserVmManagerImpl.commitUserVm.  If I am unable to trace this, I will write junits for this afresh.
________________________________________
From: Mike Tutkowski <mi...@solidfire.com>
Sent: Wednesday, January 20, 2016 12:38 AM
To: dev@cloudstack.apache.org
Subject: Re: Help with JUnits

I'm not sure what CloudStack's test-coverage numbers look like (for either
unit or integration), but I suspect we are quite well below 100% coverage.

On Tue, Jan 19, 2016 at 10:34 PM, B Prakash <bp...@hotmail.com> wrote:

> Yes it does, thanks.  Next I am going through the code to identify a
> pattern (like class name ending with TEST :-)) to identify junit code.   I
> am unable to zero in on few of the operations ie I am unable to find unit
> test for this operation UserVmManagerImpl.commitUserVm.   I am still
> looking for it.  Is the Junit coverage 100%?
>
> ________________________________________
> From: Mike Tutkowski <mi...@solidfire.com>
> Sent: Tuesday, January 19, 2016 3:01 AM
> To: dev@cloudstack.apache.org
> Subject: Re: Help with JUnits
>
> So, yeah, unit tests are written in Java while integration tests are
> written in Python using Marvin...if that helps clarify things a bit more.
>
> On Tue, Jan 19, 2016 at 12:45 AM, B Prakash <bp...@hotmail.com> wrote:
>
> > Thanks Mike, I read through the link and also saw the video, this answers
> > part of my question about executing the unit tests.  The other part of
> the
> > questions still remains ie were are junits written in Java for this class
> > and operation UserVmManagerImpl.commitUserVm.
> >
> > How do we check the junit coverage for a particular class and
> > implementation in it?  Where do I start looking for them and confirm if
> > they exist?
> >
> > ________________________________________
> > From: Mike Tutkowski <mi...@solidfire.com>
> > Sent: Monday, January 18, 2016 11:51 PM
> > To: dev@cloudstack.apache.org
> > Subject: Re: Help with JUnits
> >
> > Here's a video of a presentation I gave about Marvin (from CloudStack
> Days
> > in Austin last year):
> >
> > https://www.youtube.com/watch?v=N_eKBA_TeOs
> >
> > On Mon, Jan 18, 2016 at 9:49 PM, Mike Tutkowski <
> > mike.tutkowski@solidfire.com> wrote:
> >
> > > Does this help?
> > >
> > >
> > >
> >
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Marvin+-+Testing+with+Python
> > >
> > > On Mon, Jan 18, 2016 at 8:56 PM, B Prakash <bp...@hotmail.com> wrote:
> > >
> > >> Hi,
> > >>
> > >>
> > >>     Please can someone help me with identifying and amending junits
> for
> > >> UserVmManagerImpl.commitUserVm?  I see a test class called
> > >> UserVmManagerTest but I dont see a good junits coverage here.  Also
> > link in
> > >> the 'Developer > Testing > Unit testing with JUnit and Spring' doesnt
> > give
> > >> out lot of details on junits.
> > >>
> > >>   1.  Am I looking at the right place for junits for the class
> > >> UserVmManagerImpl.commitUserVm?
> > >>   2.  Is there any other link that provides more details on JUnits?
> > >>   3.  Any document or resource explaing cloudstack JUnit
> implementation
> > >> in greater detail would be of great help.
> > >>   4.  If I want to track junit of this class, how do I track and
> execute
> > >> them?
> > >>
> > >>
> > >> Regards,
> > >>
> > >> Prakash
> > >>
> > >
> > >
> > >
> > > --
> > > *Mike Tutkowski*
> > > *Senior CloudStack Developer, SolidFire Inc.*
> > > e: mike.tutkowski@solidfire.com
> > > o: 303.746.7302
> > > Advancing the way the world uses the cloud
> > > <http://solidfire.com/solution/overview/?video=play>*™*
> > >
> >
> >
> >
> > --
> > *Mike Tutkowski*
> > *Senior CloudStack Developer, SolidFire Inc.*
> > e: mike.tutkowski@solidfire.com
> > o: 303.746.7302
> > Advancing the way the world uses the cloud
> > <http://solidfire.com/solution/overview/?video=play>*™*
> >
>
>
>
> --
> *Mike Tutkowski*
> *Senior CloudStack Developer, SolidFire Inc.*
> e: mike.tutkowski@solidfire.com
> o: 303.746.7302
> Advancing the way the world uses the cloud
> <http://solidfire.com/solution/overview/?video=play>*™*
>



--
*Mike Tutkowski*
*Senior CloudStack Developer, SolidFire Inc.*
e: mike.tutkowski@solidfire.com
o: 303.746.7302
Advancing the way the world uses the cloud
<http://solidfire.com/solution/overview/?video=play>*™*

Re: Help with JUnits

Posted by Mike Tutkowski <mi...@solidfire.com>.
I'm not sure what CloudStack's test-coverage numbers look like (for either
unit or integration), but I suspect we are quite well below 100% coverage.

On Tue, Jan 19, 2016 at 10:34 PM, B Prakash <bp...@hotmail.com> wrote:

> Yes it does, thanks.  Next I am going through the code to identify a
> pattern (like class name ending with TEST :-)) to identify junit code.   I
> am unable to zero in on few of the operations ie I am unable to find unit
> test for this operation UserVmManagerImpl.commitUserVm.   I am still
> looking for it.  Is the Junit coverage 100%?
>
> ________________________________________
> From: Mike Tutkowski <mi...@solidfire.com>
> Sent: Tuesday, January 19, 2016 3:01 AM
> To: dev@cloudstack.apache.org
> Subject: Re: Help with JUnits
>
> So, yeah, unit tests are written in Java while integration tests are
> written in Python using Marvin...if that helps clarify things a bit more.
>
> On Tue, Jan 19, 2016 at 12:45 AM, B Prakash <bp...@hotmail.com> wrote:
>
> > Thanks Mike, I read through the link and also saw the video, this answers
> > part of my question about executing the unit tests.  The other part of
> the
> > questions still remains ie were are junits written in Java for this class
> > and operation UserVmManagerImpl.commitUserVm.
> >
> > How do we check the junit coverage for a particular class and
> > implementation in it?  Where do I start looking for them and confirm if
> > they exist?
> >
> > ________________________________________
> > From: Mike Tutkowski <mi...@solidfire.com>
> > Sent: Monday, January 18, 2016 11:51 PM
> > To: dev@cloudstack.apache.org
> > Subject: Re: Help with JUnits
> >
> > Here's a video of a presentation I gave about Marvin (from CloudStack
> Days
> > in Austin last year):
> >
> > https://www.youtube.com/watch?v=N_eKBA_TeOs
> >
> > On Mon, Jan 18, 2016 at 9:49 PM, Mike Tutkowski <
> > mike.tutkowski@solidfire.com> wrote:
> >
> > > Does this help?
> > >
> > >
> > >
> >
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Marvin+-+Testing+with+Python
> > >
> > > On Mon, Jan 18, 2016 at 8:56 PM, B Prakash <bp...@hotmail.com> wrote:
> > >
> > >> Hi,
> > >>
> > >>
> > >>     Please can someone help me with identifying and amending junits
> for
> > >> UserVmManagerImpl.commitUserVm?  I see a test class called
> > >> UserVmManagerTest but I dont see a good junits coverage here.  Also
> > link in
> > >> the 'Developer > Testing > Unit testing with JUnit and Spring' doesnt
> > give
> > >> out lot of details on junits.
> > >>
> > >>   1.  Am I looking at the right place for junits for the class
> > >> UserVmManagerImpl.commitUserVm?
> > >>   2.  Is there any other link that provides more details on JUnits?
> > >>   3.  Any document or resource explaing cloudstack JUnit
> implementation
> > >> in greater detail would be of great help.
> > >>   4.  If I want to track junit of this class, how do I track and
> execute
> > >> them?
> > >>
> > >>
> > >> Regards,
> > >>
> > >> Prakash
> > >>
> > >
> > >
> > >
> > > --
> > > *Mike Tutkowski*
> > > *Senior CloudStack Developer, SolidFire Inc.*
> > > e: mike.tutkowski@solidfire.com
> > > o: 303.746.7302
> > > Advancing the way the world uses the cloud
> > > <http://solidfire.com/solution/overview/?video=play>*™*
> > >
> >
> >
> >
> > --
> > *Mike Tutkowski*
> > *Senior CloudStack Developer, SolidFire Inc.*
> > e: mike.tutkowski@solidfire.com
> > o: 303.746.7302
> > Advancing the way the world uses the cloud
> > <http://solidfire.com/solution/overview/?video=play>*™*
> >
>
>
>
> --
> *Mike Tutkowski*
> *Senior CloudStack Developer, SolidFire Inc.*
> e: mike.tutkowski@solidfire.com
> o: 303.746.7302
> Advancing the way the world uses the cloud
> <http://solidfire.com/solution/overview/?video=play>*™*
>



-- 
*Mike Tutkowski*
*Senior CloudStack Developer, SolidFire Inc.*
e: mike.tutkowski@solidfire.com
o: 303.746.7302
Advancing the way the world uses the cloud
<http://solidfire.com/solution/overview/?video=play>*™*

Re: Help with JUnits

Posted by B Prakash <bp...@hotmail.com>.
Yes it does, thanks.  Next I am going through the code to identify a pattern (like class name ending with TEST :-)) to identify junit code.   I am unable to zero in on few of the operations ie I am unable to find unit test for this operation UserVmManagerImpl.commitUserVm.   I am still looking for it.  Is the Junit coverage 100%?  

________________________________________
From: Mike Tutkowski <mi...@solidfire.com>
Sent: Tuesday, January 19, 2016 3:01 AM
To: dev@cloudstack.apache.org
Subject: Re: Help with JUnits

So, yeah, unit tests are written in Java while integration tests are
written in Python using Marvin...if that helps clarify things a bit more.

On Tue, Jan 19, 2016 at 12:45 AM, B Prakash <bp...@hotmail.com> wrote:

> Thanks Mike, I read through the link and also saw the video, this answers
> part of my question about executing the unit tests.  The other part of the
> questions still remains ie were are junits written in Java for this class
> and operation UserVmManagerImpl.commitUserVm.
>
> How do we check the junit coverage for a particular class and
> implementation in it?  Where do I start looking for them and confirm if
> they exist?
>
> ________________________________________
> From: Mike Tutkowski <mi...@solidfire.com>
> Sent: Monday, January 18, 2016 11:51 PM
> To: dev@cloudstack.apache.org
> Subject: Re: Help with JUnits
>
> Here's a video of a presentation I gave about Marvin (from CloudStack Days
> in Austin last year):
>
> https://www.youtube.com/watch?v=N_eKBA_TeOs
>
> On Mon, Jan 18, 2016 at 9:49 PM, Mike Tutkowski <
> mike.tutkowski@solidfire.com> wrote:
>
> > Does this help?
> >
> >
> >
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Marvin+-+Testing+with+Python
> >
> > On Mon, Jan 18, 2016 at 8:56 PM, B Prakash <bp...@hotmail.com> wrote:
> >
> >> Hi,
> >>
> >>
> >>     Please can someone help me with identifying and amending junits for
> >> UserVmManagerImpl.commitUserVm?  I see a test class called
> >> UserVmManagerTest but I dont see a good junits coverage here.  Also
> link in
> >> the 'Developer > Testing > Unit testing with JUnit and Spring' doesnt
> give
> >> out lot of details on junits.
> >>
> >>   1.  Am I looking at the right place for junits for the class
> >> UserVmManagerImpl.commitUserVm?
> >>   2.  Is there any other link that provides more details on JUnits?
> >>   3.  Any document or resource explaing cloudstack JUnit implementation
> >> in greater detail would be of great help.
> >>   4.  If I want to track junit of this class, how do I track and execute
> >> them?
> >>
> >>
> >> Regards,
> >>
> >> Prakash
> >>
> >
> >
> >
> > --
> > *Mike Tutkowski*
> > *Senior CloudStack Developer, SolidFire Inc.*
> > e: mike.tutkowski@solidfire.com
> > o: 303.746.7302
> > Advancing the way the world uses the cloud
> > <http://solidfire.com/solution/overview/?video=play>*™*
> >
>
>
>
> --
> *Mike Tutkowski*
> *Senior CloudStack Developer, SolidFire Inc.*
> e: mike.tutkowski@solidfire.com
> o: 303.746.7302
> Advancing the way the world uses the cloud
> <http://solidfire.com/solution/overview/?video=play>*™*
>



--
*Mike Tutkowski*
*Senior CloudStack Developer, SolidFire Inc.*
e: mike.tutkowski@solidfire.com
o: 303.746.7302
Advancing the way the world uses the cloud
<http://solidfire.com/solution/overview/?video=play>*™*

Re: Help with JUnits

Posted by Mike Tutkowski <mi...@solidfire.com>.
So, yeah, unit tests are written in Java while integration tests are
written in Python using Marvin...if that helps clarify things a bit more.

On Tue, Jan 19, 2016 at 12:45 AM, B Prakash <bp...@hotmail.com> wrote:

> Thanks Mike, I read through the link and also saw the video, this answers
> part of my question about executing the unit tests.  The other part of the
> questions still remains ie were are junits written in Java for this class
> and operation UserVmManagerImpl.commitUserVm.
>
> How do we check the junit coverage for a particular class and
> implementation in it?  Where do I start looking for them and confirm if
> they exist?
>
> ________________________________________
> From: Mike Tutkowski <mi...@solidfire.com>
> Sent: Monday, January 18, 2016 11:51 PM
> To: dev@cloudstack.apache.org
> Subject: Re: Help with JUnits
>
> Here's a video of a presentation I gave about Marvin (from CloudStack Days
> in Austin last year):
>
> https://www.youtube.com/watch?v=N_eKBA_TeOs
>
> On Mon, Jan 18, 2016 at 9:49 PM, Mike Tutkowski <
> mike.tutkowski@solidfire.com> wrote:
>
> > Does this help?
> >
> >
> >
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Marvin+-+Testing+with+Python
> >
> > On Mon, Jan 18, 2016 at 8:56 PM, B Prakash <bp...@hotmail.com> wrote:
> >
> >> Hi,
> >>
> >>
> >>     Please can someone help me with identifying and amending junits for
> >> UserVmManagerImpl.commitUserVm?  I see a test class called
> >> UserVmManagerTest but I dont see a good junits coverage here.  Also
> link in
> >> the 'Developer > Testing > Unit testing with JUnit and Spring' doesnt
> give
> >> out lot of details on junits.
> >>
> >>   1.  Am I looking at the right place for junits for the class
> >> UserVmManagerImpl.commitUserVm?
> >>   2.  Is there any other link that provides more details on JUnits?
> >>   3.  Any document or resource explaing cloudstack JUnit implementation
> >> in greater detail would be of great help.
> >>   4.  If I want to track junit of this class, how do I track and execute
> >> them?
> >>
> >>
> >> Regards,
> >>
> >> Prakash
> >>
> >
> >
> >
> > --
> > *Mike Tutkowski*
> > *Senior CloudStack Developer, SolidFire Inc.*
> > e: mike.tutkowski@solidfire.com
> > o: 303.746.7302
> > Advancing the way the world uses the cloud
> > <http://solidfire.com/solution/overview/?video=play>*™*
> >
>
>
>
> --
> *Mike Tutkowski*
> *Senior CloudStack Developer, SolidFire Inc.*
> e: mike.tutkowski@solidfire.com
> o: 303.746.7302
> Advancing the way the world uses the cloud
> <http://solidfire.com/solution/overview/?video=play>*™*
>



-- 
*Mike Tutkowski*
*Senior CloudStack Developer, SolidFire Inc.*
e: mike.tutkowski@solidfire.com
o: 303.746.7302
Advancing the way the world uses the cloud
<http://solidfire.com/solution/overview/?video=play>*™*

Re: Help with JUnits

Posted by B Prakash <bp...@hotmail.com>.
Thanks Mike, I read through the link and also saw the video, this answers part of my question about executing the unit tests.  The other part of the questions still remains ie were are junits written in Java for this class and operation UserVmManagerImpl.commitUserVm.  

How do we check the junit coverage for a particular class and implementation in it?  Where do I start looking for them and confirm if they exist?

________________________________________
From: Mike Tutkowski <mi...@solidfire.com>
Sent: Monday, January 18, 2016 11:51 PM
To: dev@cloudstack.apache.org
Subject: Re: Help with JUnits

Here's a video of a presentation I gave about Marvin (from CloudStack Days
in Austin last year):

https://www.youtube.com/watch?v=N_eKBA_TeOs

On Mon, Jan 18, 2016 at 9:49 PM, Mike Tutkowski <
mike.tutkowski@solidfire.com> wrote:

> Does this help?
>
>
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Marvin+-+Testing+with+Python
>
> On Mon, Jan 18, 2016 at 8:56 PM, B Prakash <bp...@hotmail.com> wrote:
>
>> Hi,
>>
>>
>>     Please can someone help me with identifying and amending junits for
>> UserVmManagerImpl.commitUserVm?  I see a test class called
>> UserVmManagerTest but I dont see a good junits coverage here.  Also link in
>> the 'Developer > Testing > Unit testing with JUnit and Spring' doesnt give
>> out lot of details on junits.
>>
>>   1.  Am I looking at the right place for junits for the class
>> UserVmManagerImpl.commitUserVm?
>>   2.  Is there any other link that provides more details on JUnits?
>>   3.  Any document or resource explaing cloudstack JUnit implementation
>> in greater detail would be of great help.
>>   4.  If I want to track junit of this class, how do I track and execute
>> them?
>>
>>
>> Regards,
>>
>> Prakash
>>
>
>
>
> --
> *Mike Tutkowski*
> *Senior CloudStack Developer, SolidFire Inc.*
> e: mike.tutkowski@solidfire.com
> o: 303.746.7302
> Advancing the way the world uses the cloud
> <http://solidfire.com/solution/overview/?video=play>*™*
>



--
*Mike Tutkowski*
*Senior CloudStack Developer, SolidFire Inc.*
e: mike.tutkowski@solidfire.com
o: 303.746.7302
Advancing the way the world uses the cloud
<http://solidfire.com/solution/overview/?video=play>*™*

Re: Help with JUnits

Posted by Mike Tutkowski <mi...@solidfire.com>.
Here's a video of a presentation I gave about Marvin (from CloudStack Days
in Austin last year):

https://www.youtube.com/watch?v=N_eKBA_TeOs

On Mon, Jan 18, 2016 at 9:49 PM, Mike Tutkowski <
mike.tutkowski@solidfire.com> wrote:

> Does this help?
>
>
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Marvin+-+Testing+with+Python
>
> On Mon, Jan 18, 2016 at 8:56 PM, B Prakash <bp...@hotmail.com> wrote:
>
>> Hi,
>>
>>
>>     Please can someone help me with identifying and amending junits for
>> UserVmManagerImpl.commitUserVm?  I see a test class called
>> UserVmManagerTest but I dont see a good junits coverage here.  Also link in
>> the 'Developer > Testing > Unit testing with JUnit and Spring' doesnt give
>> out lot of details on junits.
>>
>>   1.  Am I looking at the right place for junits for the class
>> UserVmManagerImpl.commitUserVm?
>>   2.  Is there any other link that provides more details on JUnits?
>>   3.  Any document or resource explaing cloudstack JUnit implementation
>> in greater detail would be of great help.
>>   4.  If I want to track junit of this class, how do I track and execute
>> them?
>>
>>
>> Regards,
>>
>> Prakash
>>
>
>
>
> --
> *Mike Tutkowski*
> *Senior CloudStack Developer, SolidFire Inc.*
> e: mike.tutkowski@solidfire.com
> o: 303.746.7302
> Advancing the way the world uses the cloud
> <http://solidfire.com/solution/overview/?video=play>*™*
>



-- 
*Mike Tutkowski*
*Senior CloudStack Developer, SolidFire Inc.*
e: mike.tutkowski@solidfire.com
o: 303.746.7302
Advancing the way the world uses the cloud
<http://solidfire.com/solution/overview/?video=play>*™*

Re: Help with JUnits

Posted by Mike Tutkowski <mi...@solidfire.com>.
Does this help?

https://cwiki.apache.org/confluence/display/CLOUDSTACK/Marvin+-+Testing+with+Python

On Mon, Jan 18, 2016 at 8:56 PM, B Prakash <bp...@hotmail.com> wrote:

> Hi,
>
>
>     Please can someone help me with identifying and amending junits for
> UserVmManagerImpl.commitUserVm?  I see a test class called
> UserVmManagerTest but I dont see a good junits coverage here.  Also link in
> the 'Developer > Testing > Unit testing with JUnit and Spring' doesnt give
> out lot of details on junits.
>
>   1.  Am I looking at the right place for junits for the class
> UserVmManagerImpl.commitUserVm?
>   2.  Is there any other link that provides more details on JUnits?
>   3.  Any document or resource explaing cloudstack JUnit implementation in
> greater detail would be of great help.
>   4.  If I want to track junit of this class, how do I track and execute
> them?
>
>
> Regards,
>
> Prakash
>



-- 
*Mike Tutkowski*
*Senior CloudStack Developer, SolidFire Inc.*
e: mike.tutkowski@solidfire.com
o: 303.746.7302
Advancing the way the world uses the cloud
<http://solidfire.com/solution/overview/?video=play>*™*