Skip to main content

Test automation for imbus TestBench Enterprise using Robot Framework

Project description

Creating robot files

To generate the robot files itb2robot needs two parameters. A JSON configuration file and a directory or ZIP file containing the TestBench JSON report files. If no configuration file is passed, itb2robot searches the current working directory for a file named "config.json".

tb2robot -c config.json path/to/json/files.zip

Configuration of output

To configure the output of the converter a json configuration file is used. This file contains the following settings:

rfLibraryRoots

A list of the different root subdivisions of the TestBench in which robot libraries are defined. Libraries that are not part of one of these subdivisions will not be imported into the robot file. The only exception to this are forced imports, which are always included in the robot files.

"rfLibraryRoots": ["RobotLibraries", "RF"]

rfLibraryRootsTestBench

rfResourceRoots

Like the libraries, the root subdivisions of the resource files must also be specified. This can be done in rfResourceRoots.

"rfResourceRoots": ["RF-Resources"]

fullyQualified

Boolean variable that defines whether the library name is prepended to a keyword call.

"fullyQualified": true

resourceDirectory

Path to the directory which contains the used resource files. The path can be absolute or relative. In case of a relative path, a "{root}" is prepended. This parameter is necessary to specify a relative path to the resource directory when importing the resources in the setting section of a robot file.

"resourceDirectory": "{root}/Resources",
*** Settings ***
Resource    ../Resources/myKeywords.resource

generationDirectory

Path to the directory where the robot files will be generated. The path can be absolute or relative. As with the resource directory, a "{root}" can be prepended to indicate that this is a relative path

"generationDirectory": "{root}/Generated"

logSuiteNumbering

Boolean variable that defines whether the prefix of a directory that determines the execution order is shown in the logs.

"logSuiteNumbering": true

clearGenerationDirectory

Boolean variable that defines whether the specified generation directory and all files contained in it should be deleted before new robot files will be created.

"clearGenerationDirectory": true,

logCompoundInteractions

To generate not only the atomic interactions in the robot files, the parameter logCompoundInteractions can be set to true. This way, compound interactions are displayed as comments in the robot code. Furthermore, the atomic interactions that make up these compound interactions are indented to indicate which parent interaction they belong to.

"logCompoundInteractions": true,

subdivisionsMapping

A dictionary that defines which library or resource should be imported in the robot file, if a keyword from the library/resource is used. The keys of the dictionaries are the names of the libraries or resources and the values represent the import statements.

"subdivisionsMapping": {
  "libraries": {
    "SeleniumLibrary": "SeleniumLibrary    timeout=10    implicit_wait=1    run_on_failure=Capture Page Screenshot",
    "Schneewitchen": "MyLibrary"
  },
  "resources": {
    "MyKeywords": "MyKeywords.resource"
  }
}

forcedImport

Specifies which libraries must be imported into each generated robot file regardless of whether a keyword from this library is used.

"forcedImport": {
  "libraries": []
}

loggingConfiguration

Option to set itb2robots log level. Valid options are:

  • "CRITICAL"
  • "FATAL"
  • "ERROR"
  • "WARNING"
  • "WARN"
  • "INFO"
  • "DEBUG"
  • "NOTSET"

If no option is specified, the log level will be set to "INFO".

"loggingConfiguration": {
  "console": {
    "logLevel": "info"
  }
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

testbench2robotframework-0.1.1.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

testbench2robotframework-0.1.1-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file testbench2robotframework-0.1.1.tar.gz.

File metadata

  • Download URL: testbench2robotframework-0.1.1.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for testbench2robotframework-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9e6b424b73594cc8a57dcfc7771b3d570f0423a7053618e52e2cf464e95fa833
MD5 f7fd3829a7ce55c8b4d699aae93a7c64
BLAKE2b-256 7525553c7d13eedcfcb90a9a337c8e14cfe36283c0c32aa634562711da2e942b

See more details on using hashes here.

File details

Details for the file testbench2robotframework-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: testbench2robotframework-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for testbench2robotframework-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4dea5fa3d53d50245a18347aaa58f518d7acc6898ea9a705cc00030026e54540
MD5 483f8383684d4d83fafd2f02e8681344
BLAKE2b-256 4a17d9d0a49e93046808896ff15f86790ddd8bb20c4e207796c53adfab5ae8e7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page