← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #175447]: Is there are way to get names of the testcases and the status

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
no, sorry. The current version does not print such a summary when run from command line.
To refurbish the IDE Unit Test feature is on the agenda, but no movement yet.

If you need more information, when running tests from command line, use
the native Python unit test yourself.

This is a basic template:

import unittest

class myTest(unittest.TestCase):
    def setUp(self):
        pass #print "in setUp"
    def test1(self):
        #print "in Test1"
        assert True
    def test2(self):
        #print "in Test2"
        assert False
    def tearDown(self):
        pass #print "in tearDown"

suite = unittest.TestLoader().loadTestsFromTestCase(TestSik)
unittest.TextTestRunner(verbosity=2).run(suite)

This approach gives you a nice summary and information. 
You have to run the script with option -r (not with option -t !!).

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