【问题标题】:Error on updating test instance using ALM API 11.52使用 ALM API 11.52 更新测试实例时出错
【发布时间】:2018-11-30 15:56:00
【问题描述】:

我正在尝试更改测试实例的状态,如下所示:

首先我得到 test-instance-id,它是这个查询结果中的 id:

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

我得到的 id 是 4357

然后我创建这个可爱的 xml:

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

然后通过 put 发送到这个 URL:

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

结果是这个错误:

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>

有人知道我做错了什么吗?

【问题讨论】:

标签: rest alm


【解决方案1】:

MalformedURLException: no protocol 可能表明 put 请求是在没有协议指示的情况下发出的(在所描述的情况下,它是“http”)。

请验证您为 put 请求运行的代码是否包含相关协议。

【讨论】:

    猜你喜欢
    • 2015-10-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-09-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多