Showing posts with label automated testing. Show all posts
Showing posts with label automated testing. Show all posts

Tuesday, May 31, 2011

The KaRL Automated Testing Suite

So, we've submitted our first paper highlighting the KaRL Automated Testing Suite (KATS) to GPCE 2011, and the features of the toolset have really blossomed in the past month. KATS is a suite of tools that automate distributed deployment and testing in a cross platform way. This means that you can use KATS on a hybrid test bed with Windows and POSIX machines, and each of the machines will work together to accomplish distributed, automated testing.

The core of the KATS system is the KaRL reasoning engine, which provides the testing suite with a distributed knowledge and reasoning engine based on the anonymous publish/subscribe paradigm. The infrastructure is consequently host-agnostic, resulting in the ability to move tests between hosts without much difficulty. Tests can be started via cron jobs, and they will barrier and synchronize if needed.

One of the more interesting parts to the KATS system is the Generic Modeling Environment (GME) paradigm for visually modeling tests. You can read more about how to obtain and use KATS and its GME paradigm at the following links.

Links:

We're currently using KATS to model and execute distributed tests for smart phones and C++ services connected to and running on various host platforms. You can find out more at the links above.

Thursday, April 21, 2011

Android Monkeyrunner

I'm currently working on a project that requires automated testing of Android applications. Fortunately, Google has released a python API for manipulating Android devices, applications, intents, etc. called Monkeyrunner, but the help has been especially lacking. One reason for this is because the command that the Monkeyrunner project page says will generate the API documentation doesn't work because help.py does not appear to be provided in the Android SDK. This blog post will remedy that situation.

According to the Google project site, you should be able to run the following command to generate the API docs for Monkeyrunner:


monkeyrunner <format> help.py <outfile>


Unfortunately, the help.py file does not appear to exist. So, I've created a help.py file that will give you all the capabilities of the old help.py, if it ever existed. Copy and paste the following into a new file called help.py on your computer (or download the file from here):


help.py file to create on your computer

#!/usr/bin/env python

# Imports the monkeyrunner modules used by this program
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
from optparse import OptionParser

def help_callback (option, opt, value, parser):
parser.print_help ();

parser = OptionParser (add_help_option=False)
parser.add_option ("-o", "-f", "--outfile", dest="outfile", default="help.html",
help="file to output monkeyrunner help to",
metavar="OUTFILE")
parser.add_option ("-t", "--type", dest="type", default="html",
help="type of output to generate (html or text)",
metavar="TYPE")
parser.add_option ("-h", "--help", dest="help", default=None,
action="callback", callback=help_callback,
help="show usage information for this script")

(options, args) = parser.parse_args ()

if options.help is None:
text = MonkeyRunner.help(options.type)
f = open(options.outfile, 'w')
f.write(text)
f.close()

print "\nMonkeyrunner help written to " + options.outfile + " (type:" \
+ options.type + ")\n"




The file comes with its own help and usage information, which you can access by providing a -h or --h option like so:


monkeyrunner help.py -h


By default, the help.py sets the output file to help.html and sets the type of output to html. Feel free to use this to generate the Monkeyrunner built-in help for reference on your system.