FlockLab can also be used without the web interface. A simple command line tool and access using WebDAV allows for easy and automated testing using scripts.
This tutorial has been tested in a Linux environment, but it might also run under Mac OS or Cygwin. In order to walk trough this tutorial, you need the FlockLab shell tool. The 'flocklab' script uses cURL to communicate with the testbed server, therefore you might also need to install that if it is not already available on your system.
To set up the FlockLab shell tool, you have to create a '.flocklabauth' file, either in your home directory or in your current working directory. It should contain the following lines (replace your_username and your_password with you FlockLab credentials):
Make sure the 'flocklab' script is executable and in your search path (PATH environment variable).
If you haven't downloaded the sources for the tutorials yet, get them now here. We are reusing the files from tutorial 5.
Running a test
The 'flocklab' script can be used in either one of four modes:
To verify a test configuration, use the '-v' switch.
To create a new test, use the '-c' switch.
To abort a running test, use the '-a' switch.
To delete a finished test, use the '-d' switch.
In order to demonstrate this, we reuse the test setup from tutorial 5. Get the files and change into the folder of tutorial 5 and then try to validate the test configuration using
flocklab -v FlockLab_Testconfiguration.xml
If you configured everything properly, the command should print this line:
The file validated correctly.
Now you can submit the test using
flocklab -c FlockLab_Testconfiguration.xml
The returned string should look like this:
Test successfully added. Test ID: <TESTID>, Starttime: <TIME> (<TIMESTAMP>)
If you want, you can verify that your test was submitted properly by logging in to the web interface.
Evaluating the test
Once the test finished successfully, you can use cURL to download the test results over the command line. You can do so by running the following command, replacing TESTID with the ID of your test and also providing valid values for your_username and your_password: