Is it possible to use Sikuli inside an already existing Java program, to test THAT program? Or should I always create a new Java program to test my Java program

Asked by Russell Wheeler

So if I have a project already called ProjectA, should I create ProjectB to test ProjectA, or can I set up Sikuli inside ProjectA

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
Roman Podolyan (podolyan-roman) said :
#1

1) Sikuli installation runs some tests after completing install, so it is possible to include test code in a program.

2) From my over 9 years of experience in testing I would not recommend including in existing Java program tests apart from unit tests. It is generally not recommended in programming to create dependencies where you can go without them. This only complicates things.

How do you imaging running your tests? In my practice I run Sikuli tests on already built iOS or Android app wherever I need them (sometimes just switching two particular screens and seeing what happens). So I need a separate build for that.

Revision history for this message
Russell Wheeler (wheelerruss) said :
#2

Well, I am going to use it against a Java game. The game appears in a window on my desktop machine.

As the game is written in Java, I was hoping that I could put the test inside the Unit Test of my Java game, and have the Unit Test, start my app, then run the tests on it.

Revision history for this message
Roman Podolyan (podolyan-roman) said :
#3

On one hand I saw Sikuli-based tests working from JUnit methods, so it should be possible.
On the other hand I'd still recommend to keep application project and test project separate. Unit tests to unit tests, visual tests to visual tests.

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

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