← Back to team overview

sikuli-driver team mailing list archive

[Question #268299]: UnitTest stop a whole test suite

 

New question #268299 on Sikuli:
https://answers.launchpad.net/sikuli/+question/268299

Not really a question for this forum, but maybe someone can help anyway. 

I have a bunch of separate test scripts which I then executes from a test suite using the unittest framwork, like this

------------------------------------------------------------------------

class InstallAndLaunch(unittest.TestCase):
    def test1_myscriptA(self): 
        import myscriptA

class Login(unittest.TestCase):
    def test1_myscriptB(self): 
        import myscriptB

    def test2_myscriptC(self): 
        import myscriptC

------------------------------------------------------------------------

If I add "assert False" in any of the scripts and running the suite, that test will stop running and the next one will start. 

What I wonder is if it is possible to stop ALL tests from within my scripts, e.g. if the installation fail, there is no need to run any of the other tests since it wont work. 

Hope it makes sense, 

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