← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #245776]: As a new user , how to build a Sikuli test framework using Junit

 

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

    Status: Open => Answered

tlondon proposed the following answer:
Disclaimer:

1) I'm not saying this is the right way or the best way. I've never written a test suite before so I learned as I went.
2) I don't use jUnit

Despite the above disclaimers, this might be helpful to you because I
run automated tests using Sikuli. I don't mind providing sample code but
to start I thought I'd just outline what I do. I have a file I call
'Runner'. When it gets executed, this is what it does:

-Import what I need
-Load some settings/config files
-Iterate through my entire src directory running execfile() on my .py files
-Establish database connectivity
-Import Sikuli
-Apply whatever settings I want (Sikuli settings, I have test settings)
-Execute whatever test suite I have

I have test suites written and they make use of a common logging system
that I have written. The errors and some helpful information are dumped
to a database and a screenshot is taken at the time of the error. Some
test suites simply call a bunch of other test suites. This can run on my
PC or on a VM.

Let me know if you have questions or want to see some specific code
examples.

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