Testing Command Line Programs With ArubaΒΆ

Aruba and Antilles are common tools for testing command line interfaces and simple web services. Using Aruba in Solano CI reliably requires some simple configuration changes to allow multiple copies to run in parallel. By default, Aruba will be set up to put its temporary files in the tmp sub-directory of your repository. If two copies of Aruba run at the same time, they will collide. As a result, Aruba should be configured to run in Dir.tmpdir or in a per-thread sub-directory of the tmp directory. A sample configuration that accomplishes this is shown below:

Before do
  @aruba_io_wait_seconds = 5
  @aruba_timeout_seconds = 5
  if ENV['TDDIUM'] then
    @aruba_timeout_seconds = 10
    dname = File.join(ENV['TDDIUM_REPO_ROOT'], 'tmp', "aruba-#{ENV['TDDIUM_TID']}")
    FileUtils.mkdir_p(dname)
    @dirs = [dname]
    FileUtils.rm_rf(current_dir)
  end
end