Package: robotframework-libdoc2testbench
Libdoc2TestBenchRobot Framework Libdoc extension that generates imbusTestBench Enterpriseimport formats.
It can be used to generate Testbench interactions and datatypes from Robotframework libraries.Installation:To install this package you can use the followingpipcommand:pipinstallrobotframework-libdoc2testbenchNotice: This extension requires Robot Framework 5.0.0 or later and does not work with earlier versions.Usage:There are three main use cases:Import official Robot Framework librarysImport custom Robot Framework librarysImport Robot Framework resource filesImport official Robot Framework librarysFor the most basic usage you just have to pass a Robot Framework library as an argument to theLibdoc2TestBenchcommand.Libdoc2TestBenchwill create a zip-file with the name of the library in the current working directory. This zip-file can be imported to TestBench in order to use Robot Framework keywords from within TestBench.Libdoc2TestBench<LIBRARY>The<LIBRARY>argument corresponds to the Robot Framework library name that you would use to import the library in the*** Settings ***of a robot/resource file.
The second positional argument can be used to specify the name of the generated zip-file:Libdoc2TestBench<LIBRARY><output.zip>Import the generated TestBench zip-fileThe generated zip-file can be imported via theImport Project...command in the Project Management view of the imbus TestBench:Afterwards you'll find your imported RF library, the different interactions and the datatypes in the Test Elements view:The imported Testelements can be copied into another testbench project. When copying, it is important that the test elements remain in the same subdivisions.Import custom robotframework librarysLibdoc2Testbench can also be used to import custom Robot Framework librarys.Example for a custom library:classmycustomlibrary(object):defprint_hello_world(self):print("Hello World")Example Libdoc2Testbench usage:Libdoc2TestBenchmycustomlibrary.pyImport Robot Framework resource filesLibdoc2Testbench can also be used to import Robot Framework resource files.Example for a resource file:*** Keywords ***print hello worldlog Hello WorldExample Libdoc2Testbench usage:Libdoc2TestBenchpath/to/keywords.resourceImporting multiple librarys and resource files at onceLibdoc2Testbench 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 ***BrowserLibraryBuiltInmycustomlibrary.pymyresource.resourceExample Libdoc2Testbench usage:Libdoc2TestBenchimportlist.robotCommand line argumentsThere 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.ArgumentsDescriptionAllowed Values-h,--helpShow the help message and exit-a,--attachmentDefines if the resource file, which has been used to generate the interactions, will be attached to those interactions.-F FORMAT,--docformat FORMATSpecifies the source documentation format.  Possible values are Robot Framework's documentation format, HTML, plain text, and reStructuredText.  The default value can be specified in library source code and the initial default value isROBOT.ROBOTHTMLTEXTREST--libraryroot LIBRARYROOTDefines the subdivision name which contains the imported Robot Framework libraries. Default isRF.--resourceroot RESOURCEROOTDefines the subdivision name which contains the imported Robot Framework resources. Default isResource.--libversion LIBVERSIONSets the version of the documented library or resource written in the description.--libnameSets the name of the documented library or resource.-r REPOSITORY,--repository REPOSITORYSets the repository id of the TestBench import. The default isiTB_RF.-s SPECFORMAT,--specdocformat SPECFORMATSpecifies the documentation format used with XML and JSON spec files.RAWmeans preserving the original documentation format andHTMLmeans converting documentation to HTML.  The default isHTML.HTMLRAW--version,--infoWrites the Libdoc2TestBench, Robot Framework and Python version to console.--library_name_extensionAdds an extension to the name of an Robot Framework library subdivision in TestBench. Often used in combination with therfLibraryRegexintestbench2robotframework.  Default is[Robot-Library].--resource_name_extensionAdds an extension to the name of an Robot Framework resource subdivision in TestBench. Often used in combination with therfResourceRegexintestbench2robotframework. Default is[Robot-Resource].--created_datatypesOption to specify if all Robot Framework datatypes should be created in TestBench (ALL), only the enum types (ENUM) or if no datatype should be created and only generic parameters are used (NONE). The default isALL.Change log1.2Added library keyword return types with RobotFramework version >= 7Added datatype creation options with default valuesRemoved--xmlcli optionRemoved--tempcli option1.1Added TestBench datatypesAdded default values1.0rc2ADDED optional arguments for:xml-file output (instead of zip-file)custom temporary directorychanging the repository id in the xml-headercustom primary key enumeration startinfo command for printing Libdoc2TestBench/Robot Framework/Python version to consolesupport for resource-files (attachment support coming soon)FIX:only create_Datatypesubdivison in libraries when data types are presentResourcesubdivison is now in the correct parent subdivisionUpdated README.md / package help-messages to reflect changes1.0rc1first release candidateLicenseDistributed under theApache-2.0 license. SeeLICENSEfor more information.Dependenciespython >= 3.8robotframework>= 5.0.0