← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #168233]: IDE: UnitTest: Test Case Results Error

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
-- you say: This program was not running on Unit test. This code is bit complicated
Ok, that might be true for a Sikuli newbee, but not really for someone, who is familiar with Python scripts.
The magic with this example is, that it simulates a unit test run in the normal IDE, which you should do, until you understand what it is doing and it works.

The problem you might have is this line:
	ac = self.ac = App("Rechner")
It was scripted on a german Windows. Exchange the word "Rechner" with the title text of the window of calc.exe.

the last line
weAreInIDE(("testAdd",))

could be changed to run both tests in normal IDE:
weAreInIDE(("testAdd","testTypeNumber"))

if this runs error free, you might switch to the unit test environment.

-- simple code?

the simplest possible code is at the end of comment #2

but you might learn a lot from my example ;-)

-- recommendation
before starting into more complicated things like unit testing with Sikuli, you should learn the basics using the IDE in normal mode. There are many examples around and you have the docs. Looking at some faq's might help too.

And you have to decide, on which level (Python/Jython or Java API) you
want to go on, because the approaches and learning needs are totally
different.

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