Skip to content

Latest commit

 

History

History
43 lines (32 loc) · 1.82 KB

README.md

File metadata and controls

43 lines (32 loc) · 1.82 KB

<< back

Language keywords

To define our targets, and to run our tests, we use the next DSL keywords:

Types:

  • Definition DSL: keywords to define targets/items to be checked/evaluated.
  • Execution DSL: keywords used to specify accions related with reports and showing information.
  • Settings DSL: keyword to read and write config file.

Keyword table

DSL Type Descripción
expect Definition Check the obtained result with the expected value.
export Execution Make reports with the results of every evaluation.
get Settings Read param value from configuration file.
group Definition Define a group of items to check.
play Execution Run the challenge.
result Definition Contain the output of previous run order.
run Definition Execute command into remote host or localhost.
target Definition Define a target. This is the item to be checked.
send Execution Send copy of report file to remote host.
set Settings Set new param value for running configuration.
show Execution Show the results on screen.

Programming language

It is possible to use Ruby language programming into Teuton tests. For example, in the definition of our test (iterators, arrays, etc.). Useful when we have repetitive lines, etc.

Example, how to create 4 target evaluation using a List/Array:

users = ['Obiwan', 'Yoda', 'Maul', 'Vader']

for name in users do
  target "Exist user #{name}"
  run "id #{name}", on: :host1
  expect_one name
end