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


#1

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


#2

Assuming you are using this:

https://www.npmjs.com/package/testrail-promise

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


#3

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 .


#4

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