Bug 844731 - Add methods for handling test case run logs
Add methods for handling test case run logs
Status: VERIFIED
Product: TCMS
Classification: Other
Component: XMLRPC (Show other bugs)
3.7.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 3.8.1
Assigned To: Yang Ren
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-31 10:33 EDT by Petr Šplíchal
Modified: 2016-05-31 21:49 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Petr Šplíchal 2012-07-31 10:33:16 EDT
Description of problem:

Please add new methods attach_log() and detach_log() to the
TestCaseRun class so that we are able to include links to relevant
job logs in scripts. Also provide a way to get all linked logs,
perhaps TestCaseRun.get_logs(). Thanks.
Comment 1 jianchen 2012-09-26 23:32:31 EDT
add attach_log(), detach_log() and get_logs in TestCaseRun class.
please verify after deploy in stage server.
Comment 2 Xin Gao 2012-10-16 00:34:50 EDT
Verify 3.8.1-1 on tcms-test -->PASS

Verify steps:
1. >>> TestCaseRun.attach_log(1595145, 'log_name2', 'https://tcms-test.app.eng.nay.redhat.com')
2. >>> TestCaseRun.get_logs(1595145)
=============
[{'content_type': 'test case run',
  'content_type_id': 57,
  'created_on': '2012-10-16 12:24:33',
  'id': 129,
  'name': 'log_name2',
  'object_pk': '1595145',
  'site': 'tcms.engineering.redhat.com',
  'site_id': 1,
  'url': 'http://ciqe.englab.nay.redhat.com/'},
 {'content_type': 'test case run',
  'content_type_id': 57,
  'created_on': '2012-10-16 12:23:48',
  'id': 128,
  'name': 'log_name2',
  'object_pk': '1595145',
  'site': 'tcms.engineering.redhat.com',
  'site_id': 1,
  'url': 'https://tcms-test.app.eng.nay.redhat.com'},
 {'content_type': 'test case run',
  'content_type_id': 57,
  'created_on': '2012-10-16 12:22:30',
  'id': 127,
  'name': 'log_name',
  'object_pk': '1595145',
  'site': 'tcms.engineering.redhat.com',
  'site_id': 1,
  'url': 'www.redhat.com'},
 {'content_type': 'test case run',
  'content_type_id': 57,
  'created_on': '2012-10-16 12:25:08',
  'id': 130,
  'name': 'log_name2',
  'object_pk': '1595145',
  'site': 'tcms.engineering.redhat.com',
  'site_id': 1,
  'url': 'ciqe.englab.nay.redhat.com/'},
 {'content_type': 'test case run',
  'content_type_id': 57,
  'created_on': '2012-10-16 12:25:40',
  'id': 131,
  'name': 'log_name2',
  'object_pk': '1595145',
  'site': 'tcms.engineering.redhat.com',
  'site_id': 1,
  'url': 'ciqe.englab.nay.redhat.com'},
 {'content_type': 'test case run',
  'content_type_id': 57,
  'created_on': '2012-10-16 12:26:31',
  'id': 132,
  'name': 'log_name2',
  'object_pk': '1595145',
  'site': 'tcms.engineering.redhat.com',
  'site_id': 1,
  'url': 'http://www.baidu.com/'},
 {'content_type': 'test case run',
  'content_type_id': 57,
  'created_on': '2012-10-16 12:27:08',
  'id': 133,
  'name': 'log_name3',
  'object_pk': '1595145',
  'site': 'tcms.engineering.redhat.com',
  'site_id': 1,
  'url': 'http://www.baidu.com/'}]

=============

3. >>> TestCaseRun.detach_log(1595145, 133)
=============
[{'content_type': 'test case run',
  'content_type_id': 57,
  'created_on': '2012-10-16 12:24:33',
  'id': 129,
  'name': 'log_name2',
  'object_pk': '1595145',
  'site': 'tcms.engineering.redhat.com',
  'site_id': 1,
  'url': 'http://ciqe.englab.nay.redhat.com/'},
 {'content_type': 'test case run',
  'content_type_id': 57,
  'created_on': '2012-10-16 12:23:48',
  'id': 128,
  'name': 'log_name2',
  'object_pk': '1595145',
  'site': 'tcms.engineering.redhat.com',
  'site_id': 1,
  'url': 'https://tcms-test.app.eng.nay.redhat.com'},
 {'content_type': 'test case run',
  'content_type_id': 57,
  'created_on': '2012-10-16 12:22:30',
  'id': 127,
  'name': 'log_name',
  'object_pk': '1595145',
  'site': 'tcms.engineering.redhat.com',
  'site_id': 1,
  'url': 'www.redhat.com'},
 {'content_type': 'test case run',
  'content_type_id': 57,
  'created_on': '2012-10-16 12:25:08',
  'id': 130,
  'name': 'log_name2',
  'object_pk': '1595145',
  'site': 'tcms.engineering.redhat.com',
  'site_id': 1,
  'url': 'ciqe.englab.nay.redhat.com/'},
 {'content_type': 'test case run',
  'content_type_id': 57,
  'created_on': '2012-10-16 12:25:40',
  'id': 131,
  'name': 'log_name2',
  'object_pk': '1595145',
  'site': 'tcms.engineering.redhat.com',
  'site_id': 1,
  'url': 'ciqe.englab.nay.redhat.com'},
 {'content_type': 'test case run',
  'content_type_id': 57,
  'created_on': '2012-10-16 12:26:31',
  'id': 132,
  'name': 'log_name2',
  'object_pk': '1595145',
  'site': 'tcms.engineering.redhat.com',
  'site_id': 1,
  'url': 'http://www.baidu.com/'}]

=============

Actual result:
these three new methods work well.

Note You need to log in before you can comment on or make changes to this bug.