Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

testplan PUT API Blows Away Current Data (4.0.0.1)

I am having problems using the testplan API.  I am doing a PUT with the this test plan, but certain things I don't specify get blown away.

Here's an example where I wanted to add a testcase linkage to a testplan.  I found out that I first needed to grab the current testcases, then send them in again with the additional one.  Then I noticed that the PUT would blow away my categories, so I got them and sent them back in again.  Now I notice that the environment linkages get unlinked too...

Does someone know the magic to do just an update that does not blow away other data?  I do notice that the description doesn't get cleared and some other stuff on the summary page...

Here's my current XML from the HttpClient log.  It's easier to read if you cut and paste it into your own editor.  Thanks for your help!

Matt

11147 2013-06-24 16:16:54,618 [main] DEBUG httpclient.wire.header - >> "PUT /qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/IBM+Ad+Hoc/testplan/urn:com.ibm.rqm:testplan:1455 HTTP/1.1[\r][\n]"

11163 2013-06-24 16:16:54,634 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.getRequestOutputStream()
11164 2013-06-24 16:16:54,635 [main] DEBUG httpclient.wire.content - >> "<?xml version="1.0" encoding="UTF-8"?>[\r][\n]"
11164 2013-06-24 16:16:54,635 [main] DEBUG httpclient.wire.content - >> "<testplan[\r][\n]"
11165 2013-06-24 16:16:54,636 [main] DEBUG httpclient.wire.content - >> "[0x9]xmlns="http://jazz.net/xmlns/alm/qm/v0.1/"[\r][\n]"
11165 2013-06-24 16:16:54,636 [main] DEBUG httpclient.wire.content - >> "[0x9]xmlns:ns2="http://schema.ibm.com/vega/2008/"[\r][\n]"
11165 2013-06-24 16:16:54,636 [main] DEBUG httpclient.wire.content - >> "[0x9]xmlns:ns3="http://purl.org/dc/elements/1.1/"[\r][\n]"
11165 2013-06-24 16:16:54,636 [main] DEBUG httpclient.wire.content - >> " xmlns:ns4="http://jazz.net/xmlns/prod/jazz/process/0.6/"[\r][\n]"
11165 2013-06-24 16:16:54,636 [main] DEBUG httpclient.wire.content - >> "[0x9]xmlns:ns5="http://www.w3.org/1999/02/22-rdf-syntax-ns#"[\r][\n]"
11166 2013-06-24 16:16:54,637 [main] DEBUG httpclient.wire.content - >> "[0x9]xmlns:ns6="http://jazz.net/xmlns/alm/v0.1/"[\r][\n]"
11166 2013-06-24 16:16:54,637 [main] DEBUG httpclient.wire.content - >> " xmlns:ns7="http://purl.org/dc/terms/"[\r][\n]"
11166 2013-06-24 16:16:54,637 [main] DEBUG httpclient.wire.content - >> "[0x9]xmlns:ns8="http://jazz.net/xmlns/alm/qm/v0.1/tsl/v0.1/"[\r][\n]"
11167 2013-06-24 16:16:54,638 [main] DEBUG httpclient.wire.content - >> "[0x9]xmlns:ns9="http://jazz.net/xmlns/alm/qm/v0.1/testscript/v0.1/"[\r][\n]"
11167 2013-06-24 16:16:54,638 [main] DEBUG httpclient.wire.content - >> "[0x9]xmlns:ns10="http://jazz.net/xmlns/alm/qm/qmadapter/task/v0.1"[\r][\n]"
11167 2013-06-24 16:16:54,638 [main] DEBUG httpclient.wire.content - >> "[0x9]xmlns:ns11="http://jazz.net/xmlns/alm/qm/qmadapter/v0.1"[\r][\n]"
11168 2013-06-24 16:16:54,639 [main] DEBUG httpclient.wire.content - >> "[0x9]xmlns:ns12="http://jazz.net/xmlns/alm/qm/v0.1/executionworkitem/v0.1"[\r][\n]"
11168 2013-06-24 16:16:54,639 [main] DEBUG httpclient.wire.content - >> "[0x9]xmlns:ns13="http://jazz.net/xmlns/alm/qm/v0.1/executionresult/v0.1"[\r][\n]"
11168 2013-06-24 16:16:54,639 [main] DEBUG httpclient.wire.content - >> "[0x9]xmlns:ns14="http://jazz.net/xmlns/alm/qm/v0.1/catalog/v0.1"[\r][\n]"
11169 2013-06-24 16:16:54,640 [main] DEBUG httpclient.wire.content - >> " xmlns:ns16="http://jazz.net/xmlns/alm/qm/styleinfo/v0.1/"[\r][\n]"
11169 2013-06-24 16:16:54,640 [main] DEBUG httpclient.wire.content - >> " xmlns:ns17="http://www.w3.org/1999/XSL/Transform">[\r][\n]"
11169 2013-06-24 16:16:54,640 [main] DEBUG httpclient.wire.content - >> "<category term="Product" value="IBM_QuickFile "/>[\r][\n]"
11170 2013-06-24 16:16:54,641 [main] DEBUG httpclient.wire.content - >> "<category term="Release" value="IBM QuickFile 1.1.0.0"/>[\r][\n]"
11170 2013-06-24 16:16:54,641 [main] DEBUG httpclient.wire.content - >> "<testcase href="https://jazzc01.hursley.ibm.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/IBM+Ad+Hoc/testcase/slug__cdCc8M-VEeK8YcBLVF6-0Q"/>[\r][\n]"
11170 2013-06-24 16:16:54,641 [main] DEBUG httpclient.wire.content - >> "<testcase href="https://jazzc01.hursley.ibm.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/IBM+Ad+Hoc/testcase/slug__fzOtMNjLEeK8ZMBLVF6-0Q"/>[\r][\n]"
11171 2013-06-24 16:16:54,642 [main] DEBUG httpclient.wire.content - >> "<testcase href="https://jazzc01.hursley.ibm.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/IBM+Ad+Hoc/testcase/slug__VXStUNz-EeK8ZMBLVF6-0Q"/>[\r][\n]"
11171 2013-06-24 16:16:54,642 [main] DEBUG httpclient.wire.content - >> "<testcase href="https://jazzc01.hursley.ibm.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/IBM+Ad+Hoc/testcase/slug__n73e8N0CEeK8ZMBLVF6-0Q"/>[\r][\n]"
11172 2013-06-24 16:16:54,643 [main] DEBUG httpclient.wire.content - >> "</testplan>[\r][\n]"
11172 2013-06-24 16:16:54,643 [main] DEBUG org.apache.commons.httpclient.methods.EntityEnclosingMethod - Request body sent
11172 2013-06-24 16:16:54,643 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.flushRequestOutputStream()
11172 2013-06-24 16:16:54,643 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.readResponse(HttpState, HttpConnection)
11173 2013-06-24 16:16:54,644 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.readStatusLine(HttpState, HttpConnection)
11173 2013-06-24 16:16:54,644 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.readLine()
11173 2013-06-24 16:16:54,644 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readLine(InputStream, String)
11174 2013-06-24 16:16:54,645 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readRawLine()
11558 2013-06-24 16:16:55,029 [main] DEBUG httpclient.wire.header - << "HTTP/1.1 200 OK[\r][\n]"

0 votes


Accepted answer

Permanent link
To update a resource:

1. GET the resource XML.
2. Modify the writable resource properties.
3. PUT the resource XML.

See https://jazz.net/wiki/bin/view/Main/RqmApi#ScenarioUpdateTip.
Matthew Vermilion selected this answer as the correct answer

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,941

Question asked: Jun 24 '13, 4:30 p.m.

Question was seen: 4,667 times

Last updated: Jun 25 '13, 12:27 p.m.

Confirmation Cancel Confirm