Metadata-Version: 2.4
Name: robotframework-robotlog2rqm
Version: 1.8.1
Summary: Imports robot results to IBM Rational Quality Manager (RQM)
Author-email: Tran Duy Ngoan <Ngoan.TranDuy@vn.bosch.com>
License-Expression: Apache-2.0
Project-URL: Homepage, https://pypi.org/project/robotframework-robotlog2rqm/
Project-URL: Documentation, https://github.com/test-fullautomation/robotframework-robotlog2rqm/blob/develop/RobotLog2RQM/RobotLog2RQM.pdf
Project-URL: Readme, https://github.com/test-fullautomation/robotframework-robotlog2rqm/blob/develop/README.rst
Project-URL: Repository, https://github.com/test-fullautomation/robotframework-robotlog2rqm
Project-URL: Issues, https://github.com/test-fullautomation/robotframework-robotlog2rqm/issues
Keywords: robotframework,results,quality,RQM
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development
Requires-Python: >=3.11
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: robotframework>=6.1
Requires-Dist: colorama
Requires-Dist: lxml
Requires-Dist: requests
Requires-Dist: GenPackageDoc
Requires-Dist: PythonExtensionsCollection
Provides-Extra: dev
Requires-Dist: pytest>=6.0; extra == "dev"
Requires-Dist: pytest-cov>=3.0; extra == "dev"
Provides-Extra: docs
Requires-Dist: docutils>=0.22.4; extra == "docs"
Dynamic: license-file

.. Copyright 2020-2026 Robert Bosch GmbH

.. Licensed 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 at

.. http://www.apache.org/licenses/LICENSE-2.0

.. Unless 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.

RobotLog2RQM Description
========================

The Python package **RobotLog2RQM** provides ability to import `Robot Framework
test result`_ as ***.xml** format file(s) to `IBM® Rational® Quality Manager`_
(RQM) for test management.

**RobotLog2RQM** tool helps to:

* Create all required resources (*Test Case Excution Record*, *Test Case
  Execution Result*, ...) for new testcase on RQM.
* Link all testcases to provided testplan.
* Add new test result for existing testcase on RQM.
* Update existing testcase on RQM.

**RobotLog2RQM** tool is operating system independent and only works with
Python 3.

How to install
--------------

**RobotLog2RQM** can be installed in two different ways.

1. Installation via PyPi (recommended for users)

   .. code::

      pip install robotframework-robotlog2rqm

   `RobotLog2RQM in PyPi <https://pypi.org/project/robotframework-robotlog2rqm/>`_

2. Installation via GitHub (recommended for developers)

   * Clone the **robotframework-robotlog2rqm** repository to your machine.

     .. code::

        git clone https://github.com/test-fullautomation/robotframework-robotlog2rqm.git

     `RobotLog2RQM in GitHub <https://github.com/test-fullautomation/robotframework-robotlog2rqm>`_

   * Use the following command to install **RobotLog2RQM** (executed in repository main folder):

     .. code::

        python -m pip install .

     Or:

     .. code::

        python -m pip install --proxy <proxy> .

     This command will also download and install all dependencies that are required to work with the source files in the current repository.
     After the initial installation of **RobotLog2RQM** is done, you have the following two possibilities:

     1. *Clean the previous installation*:

        .. code::

           python "./cleanup_installation.py"

        ``cleanup_installation.py`` explicitly deletes all files and folders within the component installation folder under
        ``site-packages`` and also deletes local build artefacts.

     2. *Render the component documentation*:

        .. code::

           python "./genpackagedoc.py"

        This would e.g. be required in case of changes in the interface of **RobotLog2RQM**.

        The documentation is rendered by a separate application called **GenPackageDoc**, that is part
        of the build dependencies and runtime dependencies of **RobotLog2RQM**.

        **GenPackageDoc** needs to be configured. Details about how to do this, can be found in the
        `README.rst <https://github.com/test-fullautomation/python-genpackagedoc/blob/develop/README.rst>`_
        (sections *Install dependencies* and *Configure dependencies*).

   * Use the following command to build **RobotLog2RQM** (executed in repository main folder):

     .. code::

        python -m build .

     Or:

     .. code::

        python -m pip config set global.proxy <proxy>
        python -m build .

After succesful installation, the executable file **RobotLog2RQM**
will be available (under *Scripts* folder of Python on Windows
and *~/.local/bin/* folder on Linux).

In case above location is added to **PATH** environment variable
then you can run it directly as operation system's command.

How to use
----------

**RobotLog2RQM** tool requires the Robot Framework ``output.xml`` result file(s)
which will be imported, RQM information(e.g. host url, project, ...) and user
credential(user name and password) to interact with RQM resources.

Use below command to get tools's usage:

::

   RobotLog2RQM -h


The usage should be showed as below:

::

   usage: RobotLog2RQM (RobotXMLResult to RQM importer) [-h] [-v] [--testsuite TESTSUITE] [--recursive]
               [--createmissing] [--updatetestcase] [--dryrun] [--stream STREAM] [--baseline BASELINE]
               resultxmlfile host project user password testplan

   RobotLog2RQM imports XML result files (default: output.xml) generated by the
   Robot Framework into an IBM Rational Quality Manager.

   positional arguments:
   resultxmlfile         absolute or relative path to the xml result file
                         or directory of result files to be imported.
   host                  RQM host url.
   project               project on RQM.
   user                  user for RQM login.
   password              password for RQM login.
   testplan              testplan ID for this execution.

   optional arguments:
   -h, --help            show this help message and exit
   -v, --version         Version of the RobotLog2RQM importer.
   --testsuite TESTSUITE
                           testsuite ID for this execution. If 'new', then create a new
                           testsuite for this execution.
   --recursive           if set, then the path is searched recursively for
                         log files to be imported.
   --createmissing       if set, then all testcases without tcid are created
                         when importing.
   --updatetestcase      if set, then testcase information on RQM will be updated
                         bases on robot testfile.
   --dryrun              if set, then verify all input arguments
                         (includes RQM authentication) and show what would be done.
   --stream STREAM       project stream. Note, requires Configuration Management (CM)
                         to be enabled for the project area.
   --baseline BASELINE   project baseline. Note, requires Configuration Management (CM),
                         or Baselines Only to be enabled for the project area.


The below command is simple usage witth all required arguments to import
Robot Framework results into RQM:

::

   RobotLog2RQM <outputfile> <host> <project> <user> <password> <testplan>

Besides the executable file, you can also run tool as a Python module

::

   python -m RobotLog2RQM <outputfile> <host> <project> <user> <password> <testplan>


Example
~~~~~~~

In order the import the Robot result(s) to RQM, we need the ``output.xml`` result file.

So, firstly execute the Robot testcase(s) to get the ``output.xml`` result file.

Sample Robot testcase which contains neccessary information for importing into RQM:

::

   *** Settings ***
   Metadata   project      ROBFW             # Test Environment
   Metadata   version_sw   SW_VERSION_0.1    # Build Record
   Metadata   component    Import_Tools      # Component - is used for test case
   Metadata   machine      %{COMPUTERNAME}   # Hostname
   Metadata   team-area    Internet Team RQM  # team-area (case-sensitive)

   *** Test Cases ***
   Testcase 01
      [Documentation]   This test is traceable with provided tcid
      [Tags]   TCID-1001   FID-112   FID-111    robotfile-https://github.com/test-fullautomation
      Log      This is Testcase 01

   Testcase 02
      [Documentation]  This new testcase will be created if --createmissing argument
                  ...  is provided when importing
      [Tags]   FID-113  robotfile-https://github.com/test-fullautomation
      Log      This is Testcase 02

After getting ``output.xml`` result file, use below command to import that
result file into testplan ID ``720`` of ``ROBFW-AIO`` project which is hosted
at ``https://sample-rqm-host.com``

::

   RobotLog2RQM output.xml https://sample-rqm-host.com ROBFW-AIO test_user test_pw 720

Then, open RQM with your favourite browser and you will see that the test case
execution records and their results are imported in the given testplan ID.

RQMTool Submodule
=================

The package now includes a submodule **RQMTool** which provides a standalone CLI to fetch test cases
and test suites from IBM RQM test plans.

RQMTool is accessible as a Python module:

::

    python -m RobotLog2RQM.rqmtool --host <RQM_SERVER_URL> --project <PROJECT_AREA> \
                                   --user <USERNAME> --password <PASSWORD> \
                                   --testplan <TESTPLAN_ID> [--types <artifact_types>] \
                                   [--format <csv|json>] [--output-dir <DIR>] \
                                   [--basename <BASENAME>] [--dryrun]

Main features:

* Fetches selected artifact types (`testcase` or `testsuite`) from a given test plan.
* Supports CSV or JSON export, with automatic filenames including the test plan ID.

How to use RQMTool
------------------

RQMTool requires RQM information (host URL, project, credentials) and a test plan ID.
Use the `-h` argument to see full usage:

::

    python -m RobotLog2RQM.rqmtool -h

This will display all available command line options for RQMTool, such as:

* `--types` : artifact types to fetch (`testcase`, `testsuite`). Default: both.
* `--format`: output format, either `csv` or `json`.
* `--output-dir`: directory to save exported files.
* `--basename`: base name for output files.
* `--dryrun`: validate inputs and RQM login without fetching data.

Example
-------

Fetch all test cases and test suites from test plan ID 720 and export to CSV:

::

    python -m RobotLog2RQM.rqmtool --host https://sample-rqm-host.com \
                                   --project ROBFW-AIO \
                                   --user test_user \
                                   --password test_pw \
                                   --testplan 720 \
                                   --types testcase,testsuite \
                                   --format csv

Sourcecode Documentation
~~~~~~~~~~~~~~~~~~~~~~~~

To understand more detail about the tool's features and how Robot test cases and
their results are reflected on RQM, please refer to `RobotLog2RQM tool’s Documentation`_.

Feedback
--------

To give us a feedback, you can send an email to `Thomas Pollerspöck`_.

In case you want to report a bug or request any interesting feature,
please don't hesitate to raise a ticket.

Maintainers
-----------

`Thomas Pollerspöck`_

`Tran Duy Ngoan`_

Contributors
------------

`Nguyen Huynh Tri Cuong`_

`Mai Dinh Nam Son`_

`Tran Hoang Nguyen`_

`Holger Queckenstedt`_


License
-------

Copyright 2020-2026 Robert Bosch GmbH

Licensed 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 at

    |License: Apache v2|

Unless 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.


.. |License: Apache v2| image:: https://img.shields.io/pypi/l/robotframework.svg
   :target: http://www.apache.org/licenses/LICENSE-2.0.html
.. _Robot Framework test result: https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#output-file
.. _IBM® Rational® Quality Manager: https://www.ibm.com/support/knowledgecenter/SSYMRC_6.0.2/com.ibm.rational.test.qm.doc/topics/c_qm_overview.html
.. _RobotLog2RQM tool’s Documentation: https://github.com/test-fullautomation/robotframework-robotlog2rqm/blob/develop/RobotLog2RQM/RobotLog2RQM.pdf
.. _Thomas Pollerspöck: mailto:Thomas.Pollerspoeck@de.bosch.com
.. _Tran Duy Ngoan: mailto:Ngoan.TranDuy@vn.bosch.com
.. _Nguyen Huynh Tri Cuong: mailto:Cuong.NguyenHuynhTri@vn.bosch.com
.. _Mai Dinh Nam Son: mailto:Son.MaiDinhNam@vn.bosch.com
.. _Tran Hoang Nguyen: mailto:Nguyen.TranHoang@vn.bosch.com
.. _Holger Queckenstedt: mailto:Holger.Queckenstedt@de.bosch.com
