Polarion project¶
Initialization¶
The class can be instantiated like this:
pol = polarion.Polarion('http://example.com/polarion', 'user', 'password')
project = pol.getProject('Python')
Project class¶
-
class
polarion.project.Project(polarion, project_id)¶ A Polarion project instance usable to access workitem, testruns and more. usually create by using the Polarion client.
- Parameters
polarion – The polarion client instance
project_id – The project id, as can be found in the URL of the project
-
findUser(name)¶ Find a specific user by id or name in this project
-
getEnum(enum_name)¶ Get the options for a selected enumeration
- Parameters
enum_name – The first part of the enum name. Will be postpended by -enum.xml by Polarion API
- Returns
A list of options for the enum
- Return type
string[]
-
getTestRun(id: str)¶ Get a testrun by string
- Parameters
id – The ID of the project testrun.
- Returns
The request testrun
- Return type
-
getUsers()¶ Gets all users in this project
-
getWorkitem(id: str)¶ Get a workitem by string
- Parameters
id – The ID of the project workitem (PREF-123).
- Returns
The request workitem
- Return type
-
searchTestRuns(query='', order='Created', limit=- 1)¶ Query for available test runs
- Parameters
query – The query to use while searching
order – Order by
limit – The limit of test runs, -1 for no limit
- Returns
The request testrun
- Return type
Testrun[]
-
searchWorkitemFullItem(query='', order='Created', limit=- 1)¶ Query for available workitems. This will query for the items and then fetch all result. May take a while for a big search with many results.
- Parameters
query – The query to use while searching
order – Order by
limit – The limit of workitems, -1 for no limit
- Returns
The search results
- Return type
Workitem[]