<< back

  1. Definition section

  2. Execute command

  3. Result

Example: learn-07-readme

Create README files (with test instructions) from our test definition.

This example is on GitHub repository at examples/learn-07-readme/.

Definition section

Take a look at our test definition section (Group):

group "Customize readme output" do
  readme "This is our example 07."
  readme "And here we'll see how to use readme keyword"

  target "Create user david."
  readme "Help: you can use 'useradd' command to create users."
  readme "Remember: Only root is permitted to create new users."

  run "id david"
  expect "david"

end

In this example, localhost's OS must be GNU/Linux (any other compatible OS) because the command used is id david.

There exists some readme instructions after group and target lines.

Execute command

To generate automatically a README file from previous test, execute this:

teuton readme example/learn-07-readme > example/learn-07-readme/README.md

Result

Let's see the output: Content of example/learn-07-readme/README.md file.

learn-07-readme

Customize readme output

This is our example 07. And here we'll see how to use readme keyword

Go to LOCALHOST host, and do next: * Create user david. * Help: you can use 'useradd' command to create users.

* Remember: Only root is permitted to create new users.