sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #11342
Re: [Question #201012]: Simply Unit Testing not working - or is it me?
Question #201012 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/201012
Status: Open => Answered
RaiMan proposed the following answer:
--- I am still curious about the parts after the '-----' in the above question.
How you should organize a more complex script/module structure depends on what you want to achieve.
Since you came here using IDE's unittest feature, I suppose you are interested in this concept.
Faq 1804 talks about one possible approach for unittesting that uses Sikuli features.
It solves the problem "where are my images" using import for the modules containing test cases.
To make it clear from the view of unittesting:
1. a testcase ( class abc(unittest.TestCase) ) is a container for tests ( def testxyz(self) ) that share the same setup()/teardown() functions
2. a TestSuite is composed of TestCases and or TestSuites as a preparation for a test run
3. finally a TestRunner is used to run a TestSuite and produce the TestResults
The step 1. (and even step 2.) can be put into modules, that are
imported into a main script, that runs the test suites using a test
runner. More information on Python's unit testing is available in the
net (see faq).
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.