You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You want to execute robot test which are inside fenced code blocks of a markdown file (.md) like any normal robot test?
Follow the steps below then you can run your tests as simple as robot your_test_suite.md with all robot command line execution options.
Now install RobotFramework from source of your local clone with python setup.py install.
FINISH: you should now be able to execute tests in MarkDown file format (try robotframework_example.md below)
NOTE: You could also do all above modification to your already installed RobotFramework version without cloning the source. Usually you find your RF installation under Lib/site-packages/robot of your Python installation if you used PIP to intall RF.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is an example of executable Robot Framework test data/documentation in a MarkDown (.md) file format. Keep all your test automation assets in one place. This is almost real SSOF (Single Source of Truth), SPOT (Single Point of Truth) or call it what you like - it's just cool!
This example demonstrates how your executable RF test documentation looks like in MarkDowns's preview mode. It's pure joy to look at such documentation and - even more joy to work with it!
Of course you can use links to better navigate across this file (e.g. see Section III) or to link to other documents.
Section I
Let's start with a simple log test case.
# This is a Robot Framework specific MarkDown code block.# Only such code blocks will be executed when running tests with Robot's test runner.# Of course comments like this lines will be ignored by the runner!# Same way as they are ignored in .robot files*** Settings ***Library Collections
*** Test Cases ***001 Simple Log Test Case
Log Hello Python!
Log Many Robot Framework Rules!!!
Section II
Let's organize our tasks, todos and what else ...
TODOs
Task 001
Task 002 (done)
Task 003 (totally done)
Ordered Lists
Test Step äää ÄÄÄ üüü ÜÜÜÜ ßßß
No problems with Umlauten thanks to UTF-8 encoding and Python 3
Test Step
Test Step
Unordered Lists
mkdocs new [dir-name] - Create a new project.
mkdocs serve - Start the live-reloading docs server.
mkdocs build - Build the documentation site.
mkdocs help - Print this help message.
Images
You can make beautiful documentation with images, screenshots, etc. ...
(Python) Code Examples
Have you written a custom RF Library? Document code examples here!
And don't be afraid your code examples won't be executed! Only Robot Framework code block will be executed - like the one we have already seen above and the one that follows below:
# Another Robot Framework code block which will be executed by Robot's test runner!# RF code blocks may be destributed all over the .md file!# They don't have to be at one peace / in one place!*** Settings ***Library Collections
*** Test Cases ***002 Easy Robot Test
Log Hello Python!
Log Many Robot Framework Rules!!!
Section III
some text
some more text
*** Settings ***Library RequestsLibrary
*** Test Cases ***003 GET (extern)
[Documentation] GET http://httpbin.org/headers[Tags] extern
Create Session httpbin http://httpbin.org
${response}= Get Request httpbin /headers
log ${response}