Robot Framework Libdoc Extension that generates imbus TestBench Enterprise Library import formats. It can be used to generate Testbench interactions from Robotframework keywords.
To install this package you can use pip:
pip install robotframework-libdoc2testbenchNotice: This extension requires Robot Framework 4.0.0 or later and does not work with earlier versions.
There are four main use cases:
- Importing official robotframework librarys
- Importing custom robotframework librarys
- Importing resource files
- Importing multiple librarys and resource files at once
The basic usage just needs the Libdoc2TestBench command and a Robot Framework Library as input and saves a zip-file named project-dump.zip in the current working directory containing the needed information for the import.
Libdoc2TestBench <LIBRARY><LIBRARY> corresponds to the name that you would use to import the library into a robot framework file.
Browser is an example for <LIBRARY>.
By using a second positional argument you can additionally specify the output filename:
Libdoc2TestBench <LIBRARY> <output.zip>Afterwards the generated zip-file can be imported via the Import Project... command in the Project Management view of the imbus TestBench:
In the Test Elements view you can now see your imported RF library as different interactions and datatypes:
The imported Testelements can be copied into another testbench project. When copying, it is important that the test elements remain in the same subdivisions. The name of the root subdivision can be renamed with the --libraryroot option.
Libdoc2Testbench can be used to import your own robotframework librarys.
Example for a custom library:
class mycustomlibrary(object):
def print_hello_world(self):
print("Hello World")Example Libdoc2Testbench usage:
Libdoc2TestBench mycustomlibrary.pyLibdoc2Testbench can be used to import resource files.
Example for a resource file:
*** Keywords ***
print hello world
log Hello WorldExample Libdoc2Testbench usage:
Libdoc2TestBench -a myresource.resourceLibdoc2Testbench can be used to import multiple librarys and resource files at once. A special robot framework section is used for this use case.
Example for a import List:
*** Import List ***
BrowserLibrary
BuiltIn
mycustomlibrary.py
myresource.resourceExample Libdoc2Testbench usage:
Libdoc2TestBench -a importlist.robotThere are several optional arguments, that follow the structure of the robot.libdoc module. When generating imports from a RF library, these values should already be set up correctly. You may overwrite the docformat and other meta data by setting the associated arguments written below.
- 1.0rc2
- ADDED optional arguments for:
- xml-file output (instead of zip-file)
- custom temporary directory
- changing the repository id in the xml-header
- custom primary key enumeration start
- info command for printing Libdoc2TestBench/Robot Framework/Python version to console
- support for resource-files (attachment support coming soon)
- FIX:
- only create
_Datatypesubdivison in libraries when data types are present Resourcesubdivison is now in the correct parent subdivision- Updated README.md / package help-messages to reflect changes
- only create
- ADDED optional arguments for:
- 1.0rc1
- first release candidate
Distributed under the Apache-2.0 license. See LICENSE for more information.
- python >= 3.7
- robotframework >= 4.0.0
For consistent code formatting, please use Black - The Uncompromising Code Formatter with the following arguments in the root directory:
black -l 100 -S .


