On Mon, Jan 21, 2013 at 8:58 PM, Robert Collins <[email protected]>wrote:
> On 22 January 2013 16:37, Xiazhihui (Hashui, IT) <[email protected]> > wrote: > > Hi friends, > > > > > > > > I want to upload a volume driver, right now I’m writing unit > test > > case code ( it’s also need to be uploaded). > > > > > > > > And I do not know the requirements of the unit test code. Which > is > > the level of unit test cases in my unit test code should be covered: > > Function Coverage, Condition coverage, Decision Coverage, Statement > Coverage > > or others? Or should I write what I think needs? > > Pragmatically speaking, code should be tested such that if either: > - some precondition it has is changed (either elsewhere in the same > code base or in the behaviour of some other code base) that we find > out > - if someone changes the code itself and breaks an existing use case, > we find out. > > Exactly what that means may be different for different routines :). > > My general rule is to start with testing each entry and exit path and > any domain or range corner cases. > > -Rob > -- > Robert Collins <[email protected]> > Distinguished Technologist > HP Cloud Services > > _______________________________________________ > Mailing list: https://launchpad.net/~openstack > Post to : [email protected] > Unsubscribe : https://launchpad.net/~openstack > More help : https://help.launchpad.net/ListHelp > You can use some of the other back-end driver tests as a starting point or reference, and submit a review and go from there. Also feel free to grab somebody on IRC in #openstack-cinder and maybe we can help answer more detailed questions you have there. Thanks, John
_______________________________________________ Mailing list: https://launchpad.net/~openstack Post to : [email protected] Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp

