My Unit Test is not running, how can I troubleshoot the problem?

Asked by Stefan Baramov

I have a very simple unit test with one test method. Nothing fancy. However, whatever I do the test does not run at all.

If I run the test from the IDE, the IDE hides, a small window in the top left corner shows up and nothing happens. Closing the window produces nothing. The process still runs but the UI is hidden.

If I run the test from the command line I get :
 > sikuli -t mytest.sikuli
[error] null

The process starts and exits immediately. Could this be related to bug https://bugs.launchpad.net/sikuli/+bug/581712

How can i trouble shoot the issue.

Thanks
Stefan

Question information

Language:
English Edit question
Status:
Expired
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

This usually happens, when the script has syntactical errors, which are not shown.

just run the script in normal IDE mode. These errors should show up now.

When the script is free of these syntactical errors, nothing should happen on run, since you only have functions, that are not used.

Now try in test mode.

Do not forget to save the script before running, when you made changes.

Revision history for this message
Stefan Baramov (s-baramov) said :
#2

The following does not run and I cannot find the syntax error. Do I need to somehow install extra jars or something else ?

def setUp(self):
    print "Setting up"

def tearDown(self):
    print "Tearing down"

def testA(self):
    print "A"

def testB(self):
    assert 'a' == 'b'

Revision history for this message
RaiMan (raimund-hocke) said :
#3

--- need something else
definitely no. X-1.0rc3 installed and running normally is sufficient

--- script is correct
and runs as expected in my IDE's unit test view

so something else must be the problem.

What system? what Java?

Is Sikuli installed normally and does the IDE run in normal mode without problems?

Did you make any modifications to the .bat scripts coming with Sikuli?

make the following test in normal IDE run mode with your script:
add the following lines to the end of the script:

setUp(None)
tearDown(None)
testA(None)
testB(None)

do not save it and run it normally with IDE's run button.
You should get your printouts and finally an assertion exception.

How does the path look like, where you save your scripts?

Revision history for this message
Stefan Baramov (s-baramov) said :
#4

As regular script, it runs fine. As Unit Test, it does not run at all.

=== System ===
Kernel version: Windows 7 Enterprise, Multiprocessor Free
Product type: Professional
Product version: 6.1
Service pack: 0
Kernel build number: 7600
Processor speed: 2.5 GHz
Processor type: Intel(R) Core(TM)2 Duo CPU P8700 @

=== JRE ==
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
Java HotSpot(TM) Client VM (build 20.4-b02, mixed mode, sharing)

== Sikuli ==
Installed in C:\Development\SikuliX

Note, this is a 64 bit OS and the JVM is 32 bit. The Sikuli IDE is version X-1.0rc3 (r905) . I use the Sikuli-IDE.exe to start the IDE. The same problem occurs if I use the command line or the latest build from Hundson.

Revision history for this message
RaiMan (raimund-hocke) said :
#5

--1 as stated on the download page: on a 64Bit system the Sikuli-IDE-w.bat should be used to run the IDE. Do not use the exe on Win 64Bit.

--2 Sikuli is not installed in the default location on Win 64Bit, which is c:\Program Files (x86)\Sikuli X. Are you sure, that all needed environment settings are correct?

--3 any fragments of a previous rc2 install on the system?

Not answered yet: path were you save your scripts?

Revision history for this message
Launchpad Janitor (janitor) said :
#6

This question was expired because it remained in the 'Needs information' state without activity for the last 15 days.