← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #236945]: How to terminate a unittest on failure and move to following unittests

 

Question #236945 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/236945

    Status: Open => Answered

RaiMan proposed the following answer:
If you want a 2-way communication between the 2 machines, you need to
start an XML-RPC server on both machines.

The handlers should be the unit tests (preferably 1 per class)

One machine should be the master in the sense, that it tells the other machine: now we start with test1.
in startup and teardown there should be the frame communication, that takes care, that in all cases test2 starts on both machines only after test1 has finished on both machines (you might use class variables).

If one machine fails in the test, it has to tell the other machine via
XML-RPC call. In the tests you have to poll a class variable e.g.
stopRunning at the points, where the concurrent running of the other
machine is needed. If stopRunning was set to true by the other machine,
you have to skip the rest of the test.

You might delegate the workload of the test to a thread, that can be
simply terminated when needed (thread.exit() ), so you do not need a
series of "if not stopRunning" or "while not stopRunning".

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.