Bug 801110

Summary: [FEAT] - Need a way to automate the 'import from XML' files
Product: [Other] TCMS Reporter: Len DiMaggio <ldimaggi>
Component: DistributionAssignee: Yang Ren <ryang>
Status: VERIFIED --- QA Contact: Nobody <nobody>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.6CC: jcai, junzhang, ryang, xkuang, yuwang
Target Milestone: ---   
Target Release: 3.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 3.8.0-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Len DiMaggio 2012-03-07 17:17:02 UTC
Description of problem:

At present, the user can import multiple test cases from an XML file via the UI. If the user has an XML file for each of several test plans, however, he must either perform the import manually in the UI for each plan, or parse out the XML and create the individual test cases via the XMPRPC API.

Can we add an XMLRPC method to import multiple test cases from an XML file in s single step? Thx!


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 jianchen 2012-07-19 05:42:18 UTC
This FEAT was added in tcms 3.8.0.

example: 

try:
     with open('tcms.xml', 'rb') as f:
         # 3798 is plan id
         proxy.TestPlan.import_case_via_XML(3798, f.read())
 except:
     print "error "

Thanks.

Comment 2 Xin Gao 2012-07-26 03:18:36 UTC
Verify 3.8.0-1 on stage -->PASS

Verify steps:
1. assume there is a xml file,
>>>fb = open('/home/xin/downloads/tcms-testcases-2012-07-26.xml', 'rb')
2. TestPlan.import_case_via_XML(486, fb.read())


Actual result:
works well