I have a sample code to test hypervisor resource directly(only for direct 
connected agent(there is a resource loaded by mgt server)):
https://git-wip-us.apache.org/repos/asf?p=incubator-cloudstack.git;a=blob;f=engine/storage/integration-test/test/org/apache/cloudstack/storage/test/DirectAgentTest.java;h=371e6d0eb87d85ccef04300f4e4915aa5c0978d5;hb=refs/heads/javelin

You can send command directly to resource in Eclipse, without start a mgt 
server. Very nice for unit test.

> -----Original Message-----
> From: Donal Lafferty [mailto:donal.laffe...@citrix.com]
> Sent: Sunday, December 23, 2012 3:58 AM
> To: cloudstack-dev@incubator.apache.org
> Subject: RE: Feature proposals and testing
> 
> Okay, so here's a question on reuse.
> 
> Are there sample hypervisor control commands in the code base?
> 
> At the moment, I dump JSON versions of commands to log, and use this
> JSON as the basis of my unit tests.  To save time, I'd like access to
> permutations of existing command objects and the sequence that they're
> called in.  E.g. for new VM you should see a CreateCommand before a
> StartCommand.
> 
> Can anyone point to a map or list of reusable tests in the code base?  For
> now, reuse in the sense of copy/paste/hack would suffice.
> 
> 
> DL
> 
> -----Original Message-----
> From: David Nalley [mailto:da...@gnsa.us]
> Sent: 22 December 2012 12:17 AM
> To: cloudstack-dev@incubator.apache.org
> Subject: Feature proposals and testing
> 
> Hi folks:
> 
> I've seen a number of feature proposals coming through in the past week.
> Almost universally there seems to be almost zero discussion of testing for
> the proposed features.
> 
> I personally, do not consider a feature to complete without a plan to test -
> and almost certainly in automated test format via marvin. For most features
> I'd also consider it incomplete without significant unit test coverage.
> 
> Please make sure you have a plan that focuses on testing all these
> wonderful new features you are writing.
> 
> --David

Reply via email to