Forum Discussion
leandropoblet
10 years agoFrequent Contributor
Hi Colin,
From the original usage post I'm trying the simplest one "retestCase" which has no comments, no version, only test run and test case numbers as explained in the post.
//USEUNIT TestRail
function testUpdateTestRail() {
testrail.retestCase(4683, 866867);
testrail.passCase(4683, 866868, {version: 'Build 10.0.0.1234'});
testrail.blockedCase(4683, 866869, {comment: 'Blocked due to JIRA-4321'}); testrail.failCase(4683, 866870, {comment: 'Failed. JIRA-5678 logged.', version: 'Build 10.0.0.1234'});
}
joseph_michaud
Staff
10 years agoEverything goes through testrail.addResultForCase() to do a POST. Is sendPost() having a problem trying to parse dataObj created in the call? For the purpose of experimentation, what would happen if you hacked it to post something simple (like a string)?
testrail.addResultForCase = function(runId, caseId, additionalFields) {
// dataObj = testrail.dataDictonary(additionalFields);
testrail.sendPost("add_result_for_case/" + runId + "/" + caseId, "simplestring");
};
Do you still get the parse exception?