robottelo.report_portal.portal
¶
Module Contents¶
Classes¶
Represents ReportPortal |
|
Attributes¶
- robottelo.report_portal.portal.LOGGER¶
- robottelo.report_portal.portal.launch_types = ['satellite6', 'upgrades']¶
- class robottelo.report_portal.portal.ReportPortal¶
Represents ReportPortal
This holds the properties and functions to interact with Report Portal properties and launches
- defect_types¶
- statuses = ['failed', 'passed', 'skipped', 'interrupted', 'in_progress']¶
- property api_url(self)¶
Super url of report portal :returns: Base url for API request
- property headers(self)¶
The headers for Report Portal Requests. :returns: header for API request
- _format_launches(self, launches)¶
The pretty formatter function that formats launches in a structured way
- Parameters
launches (filter) – Satellite or Upgrade Type launches
- Returns dict
Launches, keyed with their snap_versions formatted as, {‘snap_version1’:launch_object1, ‘snap_version2’: launch_object2}
- _launch_requester(self)¶
The launch GET requester to fetch the all available launches of ReportPortal
- Returns dict
The json of all RP launches
- launches(self, sat_version=None, launch_type='satellite6')¶
Returns launches in Report Portal customized by sat_version, launch_type and latest number of launches sorted by latest sat version/snap version.
This does not includes each tests data for all tests in all launches, but it includes just an overview data for all and each launch in Report Portal
- Parameters
sat_version (str) – The satellite version If its not specified, then latest count of launches of satellite versions returned
launch_type (str) – Either satellite6 or upgrades, default returns only non-upgrade launches
- Returns dict
The launches of Report portal. if sat_version is given,
`{'snap_version1':launch_object1, 'snap_version2':launch_object2}`
else,`{'sat_version1':{'snap_version1':launch_object1, ..}, 'sat_version2':{}}`
- launch(self, sat_version, snap_version=None, launch_type='satellite6')¶
Returns a specific launch data in Report Portal Project
This does not includes each tests data in launch
- Parameters
sat_version (str) – The satellite version
snap_version (str) – The snap version of a given satellite version if None, the latest launch data of a given sat_version is returned
launch_type (str) – Either satellite6 or upgrades, default returns only non-upgrade launches
- Returns dict
The data directory of requested or latest launch
- class robottelo.report_portal.portal.Launch(rp, launch_info)¶
- _versions(self)¶
Sets satellite and snap version attributes of a launch
- _test_params(self, status, defect_type, user)¶
Customise parameters for Test items API request
- Returns dict
The parameters dict for API test items request
- _test_requester(self, params, page)¶
The Test Items GET requester to fetch the data on a page
If any error and before Failing explicitly, it retries for 3 times with 10 seconds delay
- Returns tuple (int, list)
Total pages count and the list of tests along with each tests properties in a page
- tests(self, status=None, defect_type=None, user=None)¶
Returns tests data customized by kwargs parameters.
This is a main function that will be called to retrieve the tests data of a particular test status or/and defect_type
- Parameters
status (str) – Filter tests of a launch with tests status
defect_type (str) – Filter tests of a launch with tests defect_type
- Returns dict
All filtered tests dict based on params data keyed by test name and test properties as value, in format -
`{'test_name1':test1_properties_dict, 'test_name2':test2_properties_dict}`