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

How to send the final status result of test id into TestRail


Hi ,

I have this part of code , which exist in the final Then step ( to send result to TestRail)
if (success) {
data.put(“status_id”, new Integer(1));
data.put(“comment”, statusMessage);
}else {

            data.put("status_id", new Integer(5));
            data.put("comment", statusMessage);

        data.put("comment", statusMessage); 

where if (!success){
return ;

        success = false;
        statusMessage = e.getMessage();  , are added in a previous Then step.

But every time the test id receives the status Failed .
How can I parse the final status into TestRail ?