examples/simple_program.rb

Initiate experiment

Getting started Claudius is extremely simple. First example illustrates how to perform experiment which writes Hello World! to TestFile in your current directory To use the DSL in your code, please require the gem:

require 'claudius'

We sepcified te experiment with name "Hello". Tree which represents our experiment was returned after parse DSL.

execution_tree = experiment 'Hello Experiment' do before do ssh "echo $PATH" end

execute is a block where we can specify particular commands.

execute do

Each starts with ssh following by string represets command.

ssh "echo Hello World! > TestFile" end end

execute tree and print result time using awesome_print

ap execution_tree.run

export tree to tree.png and tree.dot

execution_tree.export_tree('tree')