有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java如何更新HP ALM中测试运行的环境值

我正在用Java中的REST assured实现hp alm的API自动化。我试图将环境更新为SIT/UAT/DEV以运行实例,但出现错误。 网址:https://alm.srv.westpac.com.au/qcbin/rest/domains/Test/projects/AVPL/test-instances/13061 状态代码:500 正文:

<Entity Type='test-instance'>
 <Fields>
  <Field Name='status'><Value>Not Completed</Value></Field>
  <Field Name='environment'><Value>0</Value></Field>
  </Fields>
</Entity>


Error:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>

<head>
    <title>environment with id &#x27;1&#x27; does not exist</title>
    <link rel="stylesheet" type="text/css" href="/qcbin/rest-exception/rest-exception.css" />
    <script type="text/javascript" src="/qcbin/rest-exception/rest-exception.js"></script>
</head>

<body>
    <div id="banner">
        <img src="/qcbin/rest-exception/hp-logo.png" id="banner-logo"/>
        <h3 id="banner-title">HP Application Lifecycle Management</h3>
    </div>

    <div id="content-holder">
        <h1>environment with id &#x27;1&#x27; does not exist</h1>
        <div>
            <tr>
                <td><a id="exception-id-title">Exception Id:</a></td>
                <td>qccore.general-error</td>
            </tr>
        </div>
        <a id="more-details-label" style="display:none" href="#" onClick="javascript:toggleDetails()">
            <h3>Show Details</h3>
        </a>
        <div id="details-holder" style="display:none">
            <div style="display:none">
                <h4>Exception Properties:</h4>
                <div></div>
            </div>
            <div style="display:none">
                <h4>Stack Trace:</h4>
                <div></div>
            </div>
        </div>
    </div>
</body>

</html>

postman response


共 (1) 个答案

  1. # 1 楼答案

    能够使用不同的字段名更新环境值