hi,
I've come pretty far thx to these forums in the usage of the HP ALM REST API.
I can create tests, test-sets and test-instances.
but when i try to lock a test-instance I get this error:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><QCRestException><Id>qccore.general-error</Id><Title>Failed to lock object</Title><StackTrace>com.hp.alm.platform.frec.CTdFrecException: Missing frec attribute 'TESTSET'
at com.hp.alm.platform.frec.CFrecRecord.getMustValue(CFrecRecord.java:257)
at com.hp.alm.platform.frec.CFileRec.getMustValue(CFileRec.java:625)
wrapped in com.hp.alm.platform.frec.CTdFrecException: Fail to get a must attribute 'TESTSET'
shouldn't my request to generate the test instance have already brought this up. Here's the XML:
<Entity><Fields><Field Name="test-config-id"><Value>231676</Value></Field><Field Name="test-id"><Value>230674</Value></Field><Field Name="cycle"><Value>6269</Value></Field><Field Name="cycle-id"><Value>6269</Value></Field><Field Name="subtype-id"><Value>hp.qc.test-instance.MANUAL</Value></Field></Fields></Entity>
all mandatory fields are set.
and here the generated entity response xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Entity Type="test-instance"><ChildrenCount><Value>0</Value></ChildrenCount><Fields><Field Name="test-instance"><Value>15</Value></Field><Field Name="eparams"><Value/></Field><Field Name="pc-mobile-attributes"><Value/></Field><Field Name="user-template-01"><Value/></Field><Field Name="pc-mobile-host"><Value/></Field><Field Name="pc-host-name"><Value>Any</Value></Field><Field Name="plan-scheduling-date"/><Field Name="plan-scheduling-time"><Value/></Field><Field Name="id"><Value>150505</Value></Field><Field Name="ver-stamp"><Value>1</Value></Field><Field Name="pc-mobile-host-name"><Value/></Field><Field Name="os-config"><Value/></Field><Field Name="pc-testing-host"><Value>Host with purpose(s):</Value></Field><Field Name="host-name"><Value/></Field><Field Name="test-config-id"><Value>231676</Value></Field><Field Name="data-obj"><Value/></Field><Field Name="name"><Value>ermittleAngebote [15]</Value></Field><Field Name="has-linkage"><Value>N</Value></Field><Field Name="pinned-baseline"><Value/></Field><Field Name="pc-purpose"/><Field Name="exec-date"/><Field Name="cycle-id"><Value>6269</Value></Field><Field Name="cycle"><Value>6269</Value></Field><Field Name="assign-rcyc"><Value/></Field><Field Name="exec-time"><Value/></Field><Field Name="last-modified"><Value>2017-03-29 09:07:53</Value></Field><Field Name="status"><Value>No Run</Value></Field><Field Name="iterations"><Value/></Field><Field Name="pc-mobile-purpose"><Value/></Field><Field Name="exec-event-handle"><Value/></Field><Field Name="actual-tester"><Value/></Field><Field Name="is-dynamic"><Value/></Field><Field Name="attachment"><Value/></Field><Field Name="order-id"><Value>22</Value></Field><Field Name="test-id"><Value>230674</Value></Field><Field Name="subtype-id"><Value>hp.qc.test-instance.MANUAL</Value></Field><Field Name="pc-location"><Value/></Field><Field Name="pc-attributes"><Value/></Field><Field Name="environment"><Value/></Field><Field Name="owner"><Value/></Field><Field Name="bpta-change-awareness"><Value/></Field></Fields><RelatedEntities/></Entity>
the request to lock is just a simple http "POST" request to url
${serverUrl} +"/qcbin/rest/domains/X/projects/Y/test-instances/150505/lock"
can anyone see what i'm doing wrong? or what's actually missing?
any help appreciated.
ps i tried the same code to update the exec-status on the test. it worked fine...
so I'm confident it's just something with the generation of the test-instance entity... or something else I overlooked...
pps we are currently using hp alm 12.20