Automated test in Android by Sikuli
There is a very friendly and pretty cool project called ‘Sikuli‘ and the authors are from Taiwan too. What is Sikuli? I copy these texts from its website. Sikuli is a visual technology to search and automate graphical user interfaces (GUI) using images (screenshots). The first release of Sikuli contains Sikuli Script, a visual scripting API for Jython, and Sikuli IDE, an integrated development environment for writing visual scripts with screenshots easily. Sikuli Script automates anything you see on the screen without internal API’s support. You can programmatically control a web page, a desktop application running on Windows/Linux/Mac OS X, or even an iphone application running in an emulator.
How I use Sikuli for Android? Since we can catch things from screenshots, it means we can run Android emulator in my Ubuntu machine. Furthermore, I can run a vnc server in Android device, then run a vnc viewer in Ubuntu. Therefore, I can see Android HOME screen in my Desktop. What it can do for me? ha, it can run automated tests and then we don’t need SQA to verify phone basic functionalities. Like detect GSM signal, dial out a phone call, enable Bluetooth, connect to WiFi hotspot….etc.
Launch Sikuli IDE editor in Ubuntu
wget http://sikuli.org/dl/Sikuli-IDE-linux-20100104.zipunzip Sikuli-IDE-linux-20100104.zipsh Sikuli-IDE/sikuli-ide.sh
Launch Android in Ubuntu
There is another tool “androidscreencast” I am using for this automated test. It can allow me to control my Android Dev phone remotely. We can have keyboard and mouse input! This is very important for Sikuli scripts, coz I can say “Click” something or “type” something.
wget http://androidscreencast.googlecode.com/svn/trunk/AndroidScreencast/dist/androidscreencast.jnlpjavaws androidscreencast.jnlp
Let’s write some examples! Please check these draft videos!


