Specification by exampleΒΆ

You can write anything using reStructuredText to provide context and explain the tests themselves. It’s a perfect possibility for stakeholders to ensure they have the same understanding of what’s going on.

*** Settings ***
Library       OperatingSystem

*** Variables ***
${MESSAGE}    Hello, world!
${FILE_PATH}  /tmp/test.txt

*** Test Cases ***
Temporary Directory Must Be Writable
    [Documentation]    Let's create a file into the tmp directory
    Create File  ${FILE_PATH}  ${MESSAGE}
    Should Exist  ${FILE_PATH}

Obviously, this is a proper RST file and can be processed by sphinx for instance.

This Page