Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

Not able to add test result from Protractor


Using API fNeededCreateThenAddResultForCase
var reportToTestRail = function (test) {
var obj = {
“project_name”: “Name”,
“plan_name”: “Plan name”,
“section_name”: “Sec”,
“title”: jasmine.results.spec.description,
“name”:“Verify events tab Events Panel labels”,
“status”: (jasmine.results.spec.failedExpectations.length === 0 ? “Passed” : “Failed”)


    return tr.ifNeededCreateThenAddResultForCase(obj);

this adds testcase but not adding test result to test run


Assuming you are using this:

And assuming the documentation under “Automation Use Case” is correct, you need to use status_name, not status


Thanks for the help it worked but with another problem this API is adding a new testcase and appending the result , so when I create a test plan and add a test run to it this code duplicates the cases .


Worked perfectly fine now , was doing something wrong with case id fixed it .Thank you for your help