Bug 844731 - Add methods for handling test case run logs
Summary: Add methods for handling test case run logs
Keywords:
Status: VERIFIED
Alias: None
Product: TCMS
Classification: Other
Component: XMLRPC
Version: 3.7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.8.1
Assignee: Yang Ren
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-31 14:33 UTC by Petr Šplíchal
Modified: 2018-02-16 00:38 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Petr Šplíchal 2012-07-31 14:33:16 UTC
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-27 03:32:31 UTC
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 04:34:50 UTC
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.