[Cloud Application] Run Eucalyptus UI Tester on your Mac using Vagrant
by kyolee310
Initially, this blog was written to be a technical blog that describes the instructions on how to run Eucalyptus UI Tester (se34euca) on your Mac using Vagrant and Virtual Box. However, writing this blog has made me reiterate the benefits on running or developing applications on a virtual machine.
Background: Automated Tester As An Application (ATAAA)
When developing software, there is a need for having an automated test suite readily available; with the click of a button, a developer should be able to run a sequence of automated tests to perform a speedy sanity check on the code that is being worked on.
Traditionally, a couple of in-house machines would be dedicated to serve as automated testers, shared by all developers. In such setup, it would require the developers to interact with the tester machines over VPN, which can get quite hectic sometimes — especially for those developers who like to hang out at a local coffee shop.
Now, with Vagrant and Virtual Box, you can have your own personal automated tester as a “cloud application” running on a laptop. In this scenario, when the code is ready for testing, you can quickly run a set of automated tests on your laptop by launching a virtual image that has been pre-configured to be the automated tester for the project/software. When finished, the virtual instance can be killed immediately to free up the resources on the laptop.
Benefits of Running Applications on a Virtual Instance
As mentioned in the introduction, while preparing this Eucalyptus UI Tester to run as a cloud application, I rediscovered the appreciation for using virtual machines as part of the software development environment. The fact that the application runs on a virtual image brings the following benefits: contain-ability, snapshot-ability, and portability of the application.
1. Contain-ability
Running the application on a virtual instance means that no matter how messy dependencies the application requires, they all get to be installed on a contained virtual environment. This means that you get to keep your precious laptop clean and tidy, protecting it from all those unwanted unstable, experimental packages.
2. Snapshot-ability
When working with a virtual instance, at some point, you should be able to stabilize the application, polish it up to be a known state, and take a snapshot of the virtual image in order to freeze up the moment. Once the snapshot is taken and preserved, you have the ability to bring the application back to the such known state at any time. It’s just like having a time machine.
3. Portability
When working with a team or a community, the portability of the application on a virtual image might be the most appealing benefit of all. Once you polish up the application to run nicely on a virtual image, then the promise is that it will also run smoothly on any other virtual machines out there — including on your fellow developers’ laptops as well as on the massive server farms in a data center, or in the cloud somewhere. Truly your application becomes “write once, run everywhere.”
Running Eucalyptus UI Tester on Your Mac Laptop via Vagrant
If you would like to run Eucalyptus UI Tester from scratch, follow the steps below:
1. Installing Vagrant and Virtual Box on Mac OS X in 5 Steps
and
2. Installing Eucalyptus UI Tester on CentOS 6 image via Vagrant
If you would like to run Eucalyptus UI Tester from the pre-baked Vagrant image, follow the steps below:
1. Installing Vagrant and Virtual Box on Mac OS X in 5 Steps
then
3. Running PreBaked Eucalyptus UI Tester Image using Vagrant
, and see 4. Creating a New Vagrant Package Image if you are interested in creating a new image via Vagrant.
Instructions
1. Installing Vagrant and Virtual Box on Mac OS X in 5 Steps
https://github.com/eucalyptus/se34euca/wiki/Installing-Virtual-Box-and-Vagrant-on-Mac-OS-X
2. Installing Eucalyptus UI Tester on CentOS 6 image via Vagrant
https://github.com/eucalyptus/se34euca/wiki/Installing-se34euca-on-Centos-6
3. Running PreBaked Eucalyptus UI Tester Image using Vagrant
https://github.com/eucalyptus/se34euca/wiki/Running-PreBaked-se34euca-Image-using-Vagrant
4. Creating a New Vagrant Package Image
https://github.com/eucalyptus/se34euca/wiki/Creating-a-New-Vagrant-Package-Image
FWIW, if you’re on Linux, you can start a virtual X session with xvfb and avoid the overhead of launching a VM – although, you’re right that the ability to share images with colleagues is really nice.
In doing similar things, I’ve also found it handy to launch ffmpeg capturing from the screen before each test and stop it when done – that way, if a test fails, you can attach the video of that test running to whatever kind of report you generate.
Hi Tim,
Yes, launching it on a VM means more than just starting a virtual X session, yet it includes all the benefits of having a virtual session.
For instance, if you’d like to set up the capturing of the screen function included in the UI Tester, you may do so using the VM image and re-distribute the new image out for other folks to quickly check it out 😉