-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Go to documentation | quick start | ant tasks | downloads.
The robomorphine-testrunner is part of robomorphine project. The robomorphine-testrunner is supposed to treat pains around automating tests, like starting and stopping emulators, running tests, collecting test results, etc. All this should be done in a stable and reliable way, so you could easily start running your tests on CI server.
In my experience Android SDK has many annoyances and instabilities. Sometimes even broken functionality that prevents some major scenarios (usually something related to emulators). This library is also supposed to include known workarounds for these issues (when possible), so the end-user doesn't need to follow and fix their automation each time new version of SDK comes out (with new bugfixes and bugs included).
The core principles:
- It should be stable
- It should be configurable to meet complex requirements
- It should be simple to use
The last two points are contradicting, and configurability is considered a higher priority. Though simplicity of use is still important, and that's why in many cases reasonable defaults are provided.
You can look at quick start example for an example that integrates this library with Android SDK build system. This only requires one extra line in build.xml of your test project. It's quick and easy, try it.
The library exposes a number of ant tasks. But most of the core functionality is located in ant-independant library and can potentially be used from other build systems. Just to give you a head's up of what ant tasks are capable of, here is a snippet of code that runs tests on emulator and stores resulting JUnit reports:
<!-- initialize the library -->
<rbm-setup sdkdir="${sdk.dir}" />
<!-- create AVD (emulator) -->
<rbm-avd-config id="avd15" target="Google Inc.:Google APIs:15">
<sdcard size="10M" />
<screen resolution="QVGA" density="hdpi" />
</rbm-avd-config>
<!-- start emulator -->
<rbm-start-emulator avd="avd15" />
<!-- and run tests -->
<rbm-run-tests package="${tester.package}" uninstall="false">
<junit dir="bin/junit" multiple="true" />
<apks>
<tester file="${tester.apk}" />
<apk file="${tested.apk}" />
</apks>
</rbm-run-tests>