Hello, We are automating the snapshot improvement tests cases [1] from the QA plans page. Some of the test scenarios there involve concurrent spawning of virtual machines, creating snapshots on ROOT disk and live migrating machines to another host while snapshot process is in progress.
We are trying to automate the scenario by creating multiple threads within a test case. This is achieved by creating a thread class within a test suite and initializing constructors of base class. class createThread(threading.Thread, cloudstackTestCase): def __init__(self, target, *args): self._target = target self._args = args threading.Thread.__init__(self) cloudstackTestCase.__init__(self, args) def run(self): self._target(*self._args) The problem here is creating a new thread doesn't inherit logger other objects from the main thread and logs all errors/exceptions console. Using main thread's logging would either require to collect and send messages to main thread via messagequeue or initializing loggers again in createThread class. Is it fine to do so in a test suite? Or multi-threading should be incorporated within marvin framework. Also, can you think of any better way to implement this? Please let me know your thoughts. [1] http://confluence.cloudstack.org/display/QA/Snapshots+Improvements+Test+cases Regards, Girish