Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rplevka/claim_stats


https://github.com/rplevka/claim_stats

jenkins katello robottelo

Last synced: 3 months ago
JSON representation

Awesome Lists containing this project

README

        

A set of scripts for easier parsing and batch processing of the Jenkins test reports.

Usage Examples:

Parse all tiers for the last completed builds of the job
```
In [1]: import claims

In [2]: claims.config
Out[2]:
{'bld': 'lastCompletedBuild',
'job': 'automation-6.2-tier{0}-rhel{1}',
'pwd': 'nbusr123',
'url': 'https://jenkins.server.com',
'usr': 'uradnik1'}

In [5]: reports
Out[5]:
['t1':
[
'el6': [
{
u'className': u'tests.foreman.cli.test_syncplan.SyncPlanTestCase',
u'errorDetails': None,
u'errorStackTrace': None,
u'name': u'test_negative_synchronize_custom_product_past_sync_date',
u'status': u'PASSED',
u'testActions': [],
'url': u'https://jenkins.server.com/job/automation-6.2-tier4-rhel7/lastCompletedBuild/testReport/junit/tests.foreman.cli.test_syncplan/SyncPlanTestCase/test_negative_synchronize_custom_product_past_sync_date'
}
],
'el7': [
{...}
]
],
't2': [...],
...
]
```

Get a flat list of all failed tests:
```
In [6]: failures = []

In [7]: for i in reports.keys():
...: for j in reports[i].keys():
...: failures += claims.parse_fails(reports[i][j])
...:

In [8]: len(failures)
Out[8]: 324
In [9]: failures
Out[9]:
[
{u'className': u'tests.foreman.cli.test_syncplan.SyncPlanTestCase',
u'errorDetails': u'AssertionError: Repository contains invalid number of content entities',
u'errorStackTrace': u'self =