On Tue, Mar 12, 2013 at 02:43:03PM +0530, Prasanna Santhanam wrote: > The new form of marvin test after marvin-refactor should be like this: > > class MyFeatureSuite(cloudstackTestCase): > > @attr('tags=simulator,xenserver..') > def TestMyFeatureScenario(self): > af = UserAccountFactory() > vm = VirtualMachineFactory(af) #Deploy VM in user account > nw = StaticNatFactory(af.account, vm.id) > result = vm.list(arg1=val1) > self.assertEqual(result, 'expectedResult', msg='Test Failed') > > Factory objects for this and the refactored base library can be found in > integration.lib.factory and integration.lib.base. I'm using factory_boy [1] > for > this. Was stuck with an issue last week [2] that is now resolved.
Quick update: I got the basic account factory objects working in this format. I've written tests using the new framework in the factories/test directory illustrating the usage. I will start writing factories for other objects next. -- Prasanna.,