New question #232998 on Sikuli:
https://answers.launchpad.net/sikuli/+question/232998

My automation testing project plan contains 2 parts:

(1) use Eclipse + PyDev + Sikuli Libs to develop automation script;

(2) use Sikuli IDE 
    (a) to check the screenshots when develping
    (b) to run the automation test


The reason is:

(1)  Eclipse has everything to make professional, well structured, well 
documented and debuggable stuff. Just like RaiMan said in 
https://answers.launchpad.net/sikuli/+question/231799 ;)

(2a) Eclipse can't capture or check the screenshots. I really like and need the 
"Pattern Settings" function in Sikuli IDE, especially when the "Similarity" or 
"Target Offset" is needed.

(2b) When running automation test, different machines need to install/configure 
the environment. The easier the install/configure is, the less problems we will 
get.

==========================================================

But now I encounter a problem.
To make the project well structured, I created several sub-folders for it.

--Module
    --login
        --login1.py
        --login2.py
    --set
        --log.py
        --startend.py
    --dossier  # one of my company's software's name
        --...
        --...
    --...
--TestCase
    --TestCase1.py
    --TestCase2.py
    --...
--Screenshot
--Documentation

I've added the "Module" 's path to Eclipse's PYTHONPATH, and at the beginning 
of the startend.py, there are:

# Import Sikuli library
from sikuli import *
# Import other modules of PurkinjeLibraries
from set.log import *

so when I ran startend.py in Eclipse, it worked.
However, when I tried to open them in Sikuli IDE, I found that Sikuli IDE can 
only open sikuli source file(*.sikuli)...

So I change the hierarchy of "set" to:

--Module
    --set
        --log.sikuli
            --log.py
        --startend.sikuli
            --startend.py

Then Sikuli IDE could display the startend.py by opening the startend.sikuli.
However, when running, it told me that it couldn't find the module "set.log".
I know that Sikuli can find other *.sikuli in the same folder, so I changed the 
line
from 
    from set.log import *
to
    from log import *
However, when I went back to Eclipse, Eclise tole me that it couldn't find the 
module "log"...

So I added the "set" 's path to Eclipse's PYTHONPATH...
It worked but according to the structure, if using this way,
- I have lots of paths need to be added into PYTHONPATH;
- I have to added a folder of *.sikuli for each *.py to make them can be opened 
in Sikuli IDE.

Is there a easier way to fix this "inconsistent" problem?

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

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to