Search code examples
restalm

Error on updating test instance using ALM API 11.52


I am trying to change the status of a test instance proceeding like this:

First I get the test-instance-id which is the id in the result for this query:

http://xxx:xxx/qcbin/rest/domains/xxx/projects/xxx/test-instances?query={cycle-id=[1039];test-id=[4315]}

The id I get is 4357

Then I create this lovely xml:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Entity Type="test-instance"><Fields><Field Name="status"><Value>Failed</Value></Field></Fields></Entity>

And send it via put to this URL:

http://xxx:xxx/qcbin/rest/domains/xxx/projects/xxx/test-instances/4357

The result is this error:

Exception in thread "main" java.net.MalformedURLException: no protocol: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><Entity Type="test-instance"><Fields><Field Name="status"><Value>Failed</Value></Field></Fields></Entity>

Does anyone have a clue what I am doing wrong?


Solution

  • MalformedURLException: no protocol might suggest that the put request was made with no protocol indication (in the described case, it is 'http').

    Please verify the code you run for the put request includes the relevant protocol.