Package: robotframework-robotlog2db
RobotLog2DBTable of ContentsGetting StartedHow to installUsageExampleContributionSourcecode DocumentationFeedbackAboutMaintainersContributorsLicenseGetting StartedRobotLog2DBis a command-line tool that enables you to importRobot
Framework XML
resultfiles intoTestResultWebApp's
database for presenting an overview about the whole test execution and
detail of each test result.RobotLog2DBtool is operating system independent and only works with
Python 3.How to installRobotLog2DBcan be installed in two different ways.Installation via PyPi (recommended for users)pip install robotframework-robotlog2dbRobotLog2DB in
PyPiInstallation via GitHub (recommended for developers)Clone therobotframework-robotlog2dbrepository to your
machine.git clone https://github.com/test-fullautomation/robotframework-robotlog2db.gitRobotLog2DB in
GitHubInstall dependenciesRobotLog2DBrequires some additional Python libraries.
Before you install the cloned repository sources you have to
install the dependencies manually. The names of all related
packages you can find in the filerequirements.txtin the
repository root folder. Use pip to install them:pip install -r ./requirements.txtAdditionally installLaTeX(recommended: TeX Live). This is
used to render the documentation.Configure dependenciesThe installation ofRobotLog2DBincludes to generate the
documentation in PDF format. This is done by an application
calledGenPackageDoc, that is part of the installation
dependencies (seerequirements.txt).GenPackageDocusesLaTeXto generate the documentation
in PDF format. ThereforeGenPackageDocneeds to know where
to findLaTeX. This is defined in theGenPackageDocconfiguration filepackagedoc\packagedoc_config.jsonBefore you start the installation you have to introduce the
following environment variable, that is used inpackagedoc_config.json:GENDOC_LATEXPATH: path topdflatexexecutableUse the following command to installRobotLog2DB:python setup.py installAfter succesful installation, the executable fileRobotLog2DBwill
be available (underScriptsfolder of Python on Windows and~/.local/bin/folder on Linux).In case above location is added toPATHenvironment variable then
you can run it directly as operation system's command.UsageRobotLog2DBrequires the Robot Framework result file(s) which
contains the output result in XML format (default name isoutput.xml)
andTestResultWebApp's
database information for importing.Use below command to get tools's usageRobotLog2DB -hThe usage should be showed as below:usage: RobotLog2DB (RobotXMLResult to TestResultWebApp importer) [-h] [-v] [--recursive] [--dryrun] [--append] [--UUID UUID] [--variant VARIANT] [--versions VERSIONS] [--config CONFIG]
                                                                 resultxmlfile server user password database

RobotLog2DB imports XML result files (default: output.xml) generated by the Robot Framework into a WebApp database.

positional arguments:
resultxmlfile        absolute or relative path to the result file or directory of result files to be imported.
server               server which hosts the database (IP or URL).
user                 user for database login.
password             password for database login.
database             database schema for database login.

optional arguments:
-h, --help           show this help message and exit
-v, --version        version of the RobotLog2DB importer.
--recursive          if set, then the path is searched recursively for output files to be imported.
--dryrun             if set, then verify all input arguments (includes DB connection) and show what would be done.
--append             is used in combination with --UUID <UUID>.If set, allow to append new result(s) to existing execution result UUID in --UUID argument.
--UUID UUID          UUID used to identify the import and version ID on webapp. If not provided RobotLog2DB will generate an UUID for the whole import.
--variant VARIANT    variant name to be set for this import.
--versions VERSIONS  metadata: Versions (Software;Hardware;Test) to be set for this import (semicolon separated).
--config CONFIG      configuration json file for component mapping information.The below command is simple usage with all required arguments to import
Robot Framework results into TestResultWebApp's database:RobotLog2DB <resultxmlfile> <server> <user> <password> <database>Besides the executable file, you can also run tool as a Python modulepython -m RobotLog2DB <resultxmlfile> <server> <user> <password> <database>ExampleIn order the import the Robot Framework result(s) to TestResultWebApp's
database, we need the Robot Framework result file (output.xml).So, firstly execute the Robot Framework testcase(s) to get the Robot
Framework result file.Sample Robot Framework testcase which contains neccessary information
for importing into TestResultWebApp's database:*** Settings ***
# Test execution level
Metadata   project        ROBFW              # Project/Variant
Metadata   version_sw     SW_VERSION_0.1     # Software version
Metadata   version_hw     HW_VERSION_0.1     # Hardware version
Metadata   version_test   TEST_VERSION_0.1   # Test version

# File/Suite level
Documentation             This is description for Robot Framework test file
Metadata    author        Tran Duy Ngoan (RBVH/ECM1)
Metadata    component     Import_Tools
Metadata    testtool      Robot Framework 3.2rc2 (Python 3.9.0 on win32)
Metadata    machine       %{COMPUTERNAME}
Metadata    tester        %{USER}

*** Test Cases ***
Testcase 01
   [Tags]   ISSUE-001   TCID-1001   FID-112   FID-111
   Log       This is Testcase 01

Testcase 02
   [Tags]   ISSUE-RTC-003   TCID-1002   FID-113
   Log       This is Testcase 01Notes:In case you are using RobotFramework AIO, these belowMetadatadefinitions will be handled implicitly byRobotFramework Testsuites
Managementlibrary within Suite Setup.projectversion_swversion_hwversion_testmachinetestertesttoolSo that you do not need to define them in your Robot Framework
testcase(s).However, if theseMetadatadefinitions are already missing in the
Robot Framework output result file, you can specific them when
executing theRobotLog2DBtool with the optional arguments:--variant VARIANT: Project definitions--versions VERSIONS: Versions (Software;Hardware;Test)
definitions.--config CONFIG: Project, versions or component mapping
definitions.Please refer toRobotLog2DB tool's
Documentationfor more detail about these optional arguments.After getting Robot Framework result file (output.xml), use below
sample command to import that result into TestResultWebApp's database
which is hosted atlocalhostas below sample commandRobotLog2DB output.xml localhost test_user test_pw test_dbThen, open TestResultWebApp with your favourite browser and you will see
how wonderful the execution result is displayed as below figures:Dashboard view:Datatable view:ContributionWe are always searching support and you are cordially invited to help to
improveRobotLog2DBtool.Sourcecode DocumentationTo understand more detail about the tool's features, parameters and how
Robot Framework testcase information will be displayed on
TestResultWebApp, please refer toRobotLog2DB tool's
Documentation.FeedbackPlease feel free to give any feedback to us viaEmail to:Thomas PollerspöckIssue tracking:RobotLog2DB
IssuesAboutMaintainersThomas PollerspöckTran Duy NgoanContributorsNguyen Huynh Tri CuongMai Dinh Nam SonTran Hoang NguyenHolger QueckenstedtLicenseCopyright 2020-2023 Robert Bosch GmbHLicensed under the Apache License, Version 2.0 (the "License"); you
may not use this file except in compliance with the License. You may
obtain a copy of the License atUnless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.