Skip to main content

Dump testcases results to xunit file; submit files to Polarion Importers

Project description

https://coveralls.io/repos/github/mkoura/dump2polarion/badge.svg?branch=master https://travis-ci.org/mkoura/dump2polarion.svg?branch=master

Usage

Automatic submission of testing results from the CSV, SQLite, junit-report.xml (from pytest) or Ostriz JSON input file to Polarion® XUnit Importer, or submission of pre-generated XUnit or Test Case xml files to corresponding Polarion® Importer:

polarion_dumper.py -i {input_file}

By default test results are submitted to Polarion®. You can disable this bahavior with -n option. In this case the XML file used for results submission will be saved to disk. Default file location is current directory, default file name is testrun_TESTRUN_ID-TIMESTAMP.xml (can be overriden with -o option).

When output file is specified with -o PATH, the XML file used for results submission will be saved to disk. If PATH is a directory, resulting file will be PATH/testrun_TESTRUN_ID-TIMESTAMP.xml.

When the input file is a XML file with results (e.g. saved earlier with -o FILE -n) or test cases to be imported, it is submitted to Polarion®.

Configuration

You need to set the following environment variables (the same are used for pylarion):

export POLARION_USERNAME=kerberos_username
export POLARION_PASSWORD=kerberos_password

Or you can specify credentials on command line with --user kerberos_username --password kerberos_password. Or you can specify credentials in dump2polarion.yaml file.

The default user config file is ~/.config/dump2polarion.yaml. You can also specify the config file on command line with -c config_file.yaml.

Install

You don’t need to install the package, you can use the scripts directly from the cloned repository.

To install the package to your virtualenv, run

pip install dump2polarion

or install it from cloned directory

pip install .

Package on PyPI <https://pypi-hypernode.com/pypi/dump2polarion>

Requirements

You need sqlite3, all recent python versions include it by default. The rest is listed in requirements.txt.

CSV format

There needs to be a row with field names - it is by default when exported from Polarion®.

Fields are ID; Title; Test Case ID (optional but recommended); Verdict; Comment (optional); Time (optional); stdout (optional); stderr (optional) + any other field you want. Order of the fields and case doesn’t matter.

The “Verdict” field and any optional fields must be added manually. Valid values for “verdict” are “passed”, “failed”, “skipped”, “waiting” or empty. It’s case insensitive.

There can be any content before the row with field names and the test results.

SQLite format

You can convert the CSV file exported out of Polarion® using the csv2sqlite.py script:

csv2sqlite.py -i {input_file.csv} -o {output_file.sqlite3}

How to submit the XML file manually

polarion_dumper.py -i output.xml --user {user} --password {password}

or

curl -k -u {user}:{password} -X POST -F file=@./output.xml https://polarion.engineering.redhat.com/polarion/import/xunit

More info

For CFME QE specific instructions see <https://mojo.redhat.com/docs/DOC-1098563>

For info about XUnit Importer see <https://mojo.redhat.com/docs/DOC-1073077>

For info about Test Case Importer see <https://mojo.redhat.com/docs/DOC-1075945>

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

dump2polarion-0.24.tar.gz (48.5 kB view details)

Uploaded Source

Built Distribution

dump2polarion-0.24-py2.py3-none-any.whl (26.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file dump2polarion-0.24.tar.gz.

File metadata

File hashes

Hashes for dump2polarion-0.24.tar.gz
Algorithm Hash digest
SHA256 8a360270b46d1e2026d17ce1d77feecc99be6afd8b4b1ce5726ef96f116893de
MD5 b3fda4cacf485aa79ceb39c04f54475c
BLAKE2b-256 370720f8a490d49db284bd830fd6c37c6e11e8326d4754ef84fe6f5669445f2c

See more details on using hashes here.

File details

Details for the file dump2polarion-0.24-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for dump2polarion-0.24-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 17148859d319ca930a2e816278521ba3fe01e908566a5d76fc0797c340f457d2
MD5 4e58849b22bc1cafb7f51b687d9c3eb4
BLAKE2b-256 910c56bb9e3778a230994455acae26dc9bf09c1f103951f4e2da7f477ac96785

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