X-1.0rc2: Windows: Unittests not working with some scriptnames when called via command line with -t --- possible workaround

Bug #826769 reported by j
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SikuliX
Won't Fix
Undecided
RaiMan

Bug Description

--- possible workaround

script names starting with the letters c or m seem to work.

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

*** comment on Mac:

This does not happen on Mac Lion using rc3 containing Jython 2.5.2

Did not test on Linux.

So it might be a problem of the internal usage of JUnit on Windows.

I did not find any code in the Sikuli source, that depends on the filename, with the only exception, that the internally generated test class is named using the name of the Sikuli script folder.

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

This Bug was reproducable with the combinations WinXP & rc2 as well as with Win7 & rc3.

When executing a Sikuli-test via commandline like

sikuli-ide.bat -t <test.sikuli>

sikuli has some odd behavior: The script does in some cases not load at all but only prints [error] null, and in other cases refuses to find any kind of image on the screen, resolving in FindFailed-Exceptions.

A quick test revealed the following correlation between name of the sikuli-script and the mentioned behavior:
All scripts where executed as

Filenames a.sikuli as well as b.sikuli resolved in a Find Failed Exception for every find() in the script.
Filenames c.sikuli, d.sikuli, e.sikuli and m.sikuli worked normal.
Filenames f.sikuli and x.sikuli did nothing but printing [error] null

I did not test more filenames yet.

Look here for all the detail https://answers.launchpad.net/sikuli/+question/167514 (last posts)

Tags: unittest
RaiMan (raimund-hocke)
summary: - X1.0rc2 Unittests not working with some scriptnames when called via
+ X-1.0rc2 Unittests not working with some scriptnames when called via
commandline
summary: X-1.0rc2 Unittests not working with some scriptnames when called via
- commandline
+ command line with -t
RaiMan (raimund-hocke)
summary: X-1.0rc2 Unittests not working with some scriptnames when called via
- command line with -t
+ command line with -t --- possible workaround
description: updated
Revision history for this message
j (j-the-k) wrote : Re: X-1.0rc2 Unittests not working with some scriptnames when called via command line with -t --- possible workaround

More detailed test:
I saved this script

def setUp(self):
 pass

def tearDown(self):
 pass

def testThis(self):
 assert(exists(image_on_desktop.png))

under the below mentioned different names and executed them with the windowsXP commandline: skikuli-ide.bat -t script.sikuli.
This were the results (scriptnames seperated by comma):

Working
c,d,e,g,h,i,j,k,l,m,o,p,q,s,u,w,y,z,ca,ma,cx,

Find Fail exception/assertion error
a,b,n,r,t,v,ac,fm

[error] null
f,x

So it seems most letters are safe, but I don't know how the behaviour will be with longer filenames (e.g. f.sikuli = [error]null, fm.sikuli = Find Failed )

RaiMan (raimund-hocke)
summary: - X-1.0rc2 Unittests not working with some scriptnames when called via
- command line with -t --- possible workaround
+ X-1.0rc2: Windows: Unittests not working with some scriptnames when
+ called via command line with -t --- possible workaround
RaiMan (raimund-hocke)
description: updated
RaiMan (raimund-hocke)
description: updated
Revision history for this message
RaiMan (raimund-hocke) wrote :

no longer supported

Changed in sikuli:
status: New → Won't Fix
milestone: none → x1.0
assignee: nobody → RaiMan (raimund-hocke)
RaiMan (raimund-hocke)
tags: added: unittest
RaiMan (raimund-hocke)
Changed in sikuli:
status: Won't Fix → In Progress
RaiMan (raimund-hocke)
Changed in sikuli:
status: In Progress → Won't Fix
milestone: x1.0 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.