Skip to main content

Polarion client for Python

Project description

python-polarion

This package allows access to a Polarion server. Note that this is the first release and that updates will change the interface in the near future.

Examples

Documentation is lacking in this test release, so here are some snippets to get you going.

Creating the Polarion client:

client = polarion.Polarion('http://example.com/polarion', 'user', 'password')

Opening a project using the project name:

project = client.getProject('Python')

Load a workitem:

workitem = project.getWorkitem('PYTH-510')

Modify a workitem:

x = workitem.getVailableActions() # x will be an array of actions
workitem.preformAction(x[1])

or:

x = workitem.getVailableStatus() #this forces the new state ignoring any rules set in Polarion
workitem.setStatus(x[1])

or:

workitem.setDescription('Some description..')
workitem.addComment('test comment', 'sent from Python')
workitem.addHyperlink('google.com', workitem.HyperlinkRoles.EXTERNAL_REF)

Getting options for this type of workitem:

workitem.getResolutionEnum() # these return an empty array of no workitem specific options are set
workitem.getSeverityEnum()
workitem.getStatusEnum()

You can modify any property and call the save method. Some require a certain structure, which methods like setDescription handle for you, not adhering to it will cause an exception.

Load a test run:

run = project.getTestRun('SWQ-0001')

or

runs = project.searchTestRuns('SWQ*') #this is a query and will work the same as in Polarion

Modifying a test record: Load a workitem:

run = project.getTestRun('SWQ-0001')
run.records[0].setResult(record.Record.ResultType.PASSED, ' Comment with test result')

Known issues or missing features

No way of knowing the test run possible statuses.

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

polarion-0.1.0.tar.gz (6.6 kB view hashes)

Uploaded Source

Built Distribution

polarion-0.1.0-py3-none-any.whl (20.9 kB view hashes)

Uploaded Python 3

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