我无法在测试轨中更新Protractor测试的结果。我见过各种各样的npm模块,非常混乱--不同的作者提到了不同的npm模块。
环境: 1. ProtractorJS (基于NPM) 2.测试轨
在loginPage.js内部,我编写了非常基本的测试来验证。
loginPage.js - is below:
var TestRail = require("protractor-testrail-promise");
var loginPage = function () {
var testrail = new TestRail("https://myproject.testrail.net", "useremail@email.com", "pw");
var testCaseId="A644776";
var testResultId="1"; //Equal to Pass
testrail.addResult(testCaseId, testResultId).then(function(body) {
console.log(body);
})
});备注:结果应在testrail系统中更新。
实际情况:在测试轨中没有发生更新,我的VSCode控制台也没有出现错误。
发布于 2019-02-08 09:02:52
我去掉了testcaseid的前缀"A“。代码中不应添加前缀。
var TestRail = require("testrail-promise");
var tr = new TestRail('https://myproj.testrail.net', 'dinesh@abc.com', 'werer');
var obj = {
"run_id": 001 ,
"project_id":2,
"section_name":"My Section", //Immediate section name is fine
"case_id": 60644 , //Original case id - (View Case)
"custom_buildno":"B76",
"status_id":"1", //pass
};
tr.addResultForCase(obj).then(function (err) { console.log('Error ==>', err);});https://stackoverflow.com/questions/54490342
复制相似问题