Polarion Test runs

Initialization

Testrun class

class polarion.testrun.Testrun(polarion, uri=None, polarion_test_run=None)

Create a Polarion testrun object from uri or directly with Polarion content

Parameters
  • polarion – Polarion client object

  • uri – Polarion uri

  • polarion_test_run – The data from Polarion of this testrun

Variables

records – An array of Record

Test record class

class polarion.record.Record(polarion, test_run, polarion_record)

Create a Polarion test record,

Parameters
  • polarion – Polarion client object

  • test_run – Test run instance

  • polarion_record – The data from Polarion of this testrun

class ResultType(value)

Record result enum

getComment()

Get a comment if available. The comment may contain HTML if edited in Polarion!

Returns

Get the comment, may contain HTML

Return type

string

getResult()

Get the test result of this record

Returns

The test case result

Return type

ResultType

save()

Saves the current test record

setComment(comment)

tries to get the severity enum of this workitem type When it fails to get it, the list will be empty

Parameters

comment – Comment string, may contain HTML

setResult(result: polarion.record.Record.ResultType = <ResultType.FAILED: 'failed'>, comment=None)

Set the result of this record and save it.

Parameters
  • result – The result of this record

  • comment – Comment string, may contain HTML

setTestStepResult(step_number, result: polarion.record.Record.ResultType, comment=None)

” Set the result of a test step

Parameters
  • step_number – Step number

  • result – The result fo the test step

  • comment – An optional comment