New question #664616 on Sikuli:


I am an active user of Sikuli !

I use sikuli with python language and I use to run my scripts by calling java 
-jar sikulix.jar myscript.sikuli

I would like to know if there is a way to use BDD with my Sikuli test scripts 
instead of unittest.

My script are looking like this:

--- script sample 

# -*- coding:utf-8 -*-

ok 2/19/2018 - Windows

import unittest
import os
import datetime
import HTMLTestRunner
import testscontext
import applications

class ApplicationsTestCase(unittest.TestCase):

    def setUp(self):
        App.close('Google Chrome')

    def testLaunchChromeWithoutWaiting(self):
        applications.launch_app("google chrome", wait_img=False, timeout=10)

    def testLaunchChromeAndWait(self):
        applications.launch_app("google chrome", wait_img=True, timeout=10)

if __name__ == '__main__':

    tests = unittest.TestLoader().loadTestsFromTestCase(ApplicationsTestCase)
    now =
    filename = "{}-{}-{}.{}h{}.html".format(
        now.year, now.month,, now.hour, now.minute
    with open(os.path.join(testscontext.outpath, 'test_reports', 
'applications_tests', filename), 'w') as rf:
        runner = HTMLTestRunner.HTMLTestRunner(
            stream = rf, description="Unit testing src/applications. 
Environment: {}.".format(Env.getOS()),
dirTestScreenshots=os.path.join(testscontext.outpath, 'test_reports', 

--- end script 

Then can I write something like that instead ?

--- script sample -------------------------------------
Feature: Test Applications launching
  Scenario: Launch Google Chrome

    When I launch "Google Chrome"
    Then I shoud see "google chrome menu icon"

With steps definitions in another .sikuli/.py module of course.

So the main question is: is sikuli behavior compatible with BDD testing and 
Jerkhin language ? 
If yes how to implement Behave/Lettuce BDD tests ?


You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

Mailing list:
Post to     :
Unsubscribe :
More help   :

Reply via email to