使用javascript集会节点模块更新测试用例结果在Rally中

时间:2017-08-10 10:05:37

标签: javascript rally

我尝试使用节点模块"集会"更新Rally中的测试用例结果。 (https://github.com/RallyTools/rally-node/wiki/User-Guide

这是我使用的方法:

rally.update({
                ref: 'https://rally1.rallydev.com/slm/webservice/v2.0/testcaseresult/'+data.TestCaseResult.TestCases, //may be a ref ('/defect/1234') or an object with a _ref property
                data: {
                    Build: data.TestCaseResult.Build, //the data with which to update the specified object
                    Verdict: data.TestCaseResult.Verdict,
                    //Owner: data.TestCaseResult.Tester,
                    Notes: data.TestCaseResult.Notes
                }
            }, function (error, result) {
                if (error) {
                    console.log(error);
                } else {
                    console.log(result.Object);
                }
            });
        }

我发送以下内容:

TestCaseResult:Object {Build: "SOMEBUILD", TestCases: "51741622121", Tester: "tester@tester.com" …}
Build:"SOMEBUILD"
Notes:"Some notes..."
TestCases:"51741622121"
Tester:"tester@tester.com"
Verdict:"Fail"

但这就是服务器给我的回报: {[错误:/ testcaseresult / 53198558325:401!体=未定义]   错误:[' / testcaseresult / 53198558325:401!体=未定义' ]}

这不是API密钥或连接问题,因为在运行更新之前,我运行查询以获取测试用例内部ID,它运行正常。我想知道一个使用节点'拉力节点'更新Rally中的测试用例结果的示例。 API。

以下是我在代码中实例集会的方式:

var rally = new rallyClient({
    apiKey: sails.config.services.rally.apiKey,
    apiVersion: 'v2.0',
    server: sails.config.services.rally.host,
    requestOptions: {
        proxy: 'proxy info'
    }
});

谢谢!

0 个答案:

没有答案