This document tries to explain the four major parts of AVE, what they are good for and how they fit together.
A number of illustrations are used to symbolize the concepts and technologies discussed in this document:
Illustration | Meaning |
---|---|
![]() |
Git: This is the mascot of the Git SCM project. |
![]() |
Test Job: A worker figure armed with a spade. |
![]() |
Build Job: This was supposed to look like the vallet mascot of the Jenkins project. |
![]() |
Test Anatomy: Boticelli’s classic painting “La Nascita di Venere”, often used to symbolize anatomy. |
![]() |
Broker: Performs allocation and reclamation of test lab equipment. |
![]() |
Workspace: Codifies test host properties and serves “scratch” space to test jobs. |
![]() |
Cradle: Used in the widest possible meaning of the word. “Cradles” may be power cycling fixtures used to force handsets into service mode, or relays to control USB connectivity of a tested device, etc. |
![]() |
Network Simulator: Faraday cages with e.g. faked GPS satellites inside. |
So AVE uses Boticelli’s “La Nascita di Venere” to symbolize anatomy, but what is test anatomy?
Test anatomy establishes orders of execution for tests. The goal is usually to execute simple tests before complex ones, to save time by skipping the complex tests if the simpler ones fail. Another common goal is to order tests so that a system’s fundament is verified before features that depend on the fundament.
AVE supports test anatomy by using two concepts:
Before the dependencies between test jobs can be established, we must know which test jobs are available. Each product should have a catalog that describes the purpose of each test job written for the product. This is very similar to writing documentation for an API, except the calls are made to jobs instead of functions.
But there is a problem. The definition of a test job can escape cataloguing by being stored outside centralized delivery systems. Jenkins jobs is an example of this. Why? They are
Governance can’t be based on something that loose. What we really want is to use an existing CM system for labeling to create a reliable mapping between jobs and their purposes:
To be handled as source code artifacts in a CM system, the basic requirement on test jobs is that they are written as proper programs, using API’s designed for this purpose.
Returning to the example of Jenkins jobs, please note that they are generated from check boxes, selection menus and various input fields found in the configuration console for each job. The stored form of this configuration is not necessarily meant to be human readable and may take arbitrary forms that are not suitable for Git or other patch based versioning systems. As long as test jobs are Jenkins jobs, we can’t have asset management on the jobs and thus no test anatomy.
Note
Jenkins is a tremendously useful tool. It is just that it should not be used to directly represent test jobs.
Alright? So everything hinges on some collection of API’s designed for test job configuration. What are these API’s?
As mentioned, we need test job API’s for brokers and resources, to support allocation and control of equipment.
The broker is a networked service that is installed on each test host. It owns all equipment connected to the host and uses a host specific configuration to keep track of how different pieces of equipment can be combined. It presents an API that test jobs use to allocate “stacks” of equipment.
An advanced example would be a handset whose battery connection is controlled by a relay and monitored by a power meter, on a test host that has a unique tool installed.
AVE lets lab owners control the host specific configuration details that are unique to each lab, while the test job developer controls only the job specific configuration details. This gives lab owners a governed space that only they control, which is important for lab development and maintenance. It also facilitates exchange of test jobs between labs because the jobs only use well defined API’s to query the host specific configurations.
The networking of the broker means that test jobs can be executed on one host, while all equipment manipulation happens on another host (where the broker is running). This lets developers execute test jobs manually on their own workstations during test job development.
The system is designed with lab owners in mind. It must be easy to cluster a couple of brokers and give test job developers directions for how to connect to the lab. Of course, individual developers can also use this to set up their own miniature labs on their workstations. All you need is the broker and some equipment.
Test jobs need to track the state of equipment. On the very low level, this is about power cycling handsets in and out of service mode. On the very high level, this is about coordination of multiple pieces of equipment.
Most equipment is not hard to control once the allocation mechanism is in place but SoMC’s own handsets make an exception. Why? Because they have two properties that are frequently in conflict:
Especially, the handset’s ability to power cycle between service mode and normal Android mode is critical. Unstable handsets can easily be lost at this boundary and end up in a “draining state” where they have to be manually recovered. This has consequences for test automation:
To handle this, three things should be done:
Product often do not expose API’s to tell developers what is going on inside. Android in particular does not have many testability API’s. AVE solves this by shipping various support APK’s that can be installed during testing. Such APK’s can implement missing testability API’s.
Another problem is that system testing is often not meaningful if the product is the only available observer of itself. The list of auxiliary equipment needed for different kinds of system tests can be made very long:
AVE is designed to support processes and strategies that significantly improve the ability to track progress in product projects: