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

POST API with Testrail results

Hi,
My unit test did work great with the API to TestRail.
After a few updates (add more unit tests).
The API stops to work and does not add the results in the Testrail run case.
The error that I get is:
"TestRail.APIException : TestRail API returned HTTP 400 (“No (active) test found for the run/case combination.”

Same URL and URI, User and password.

APIClient _client = new APIClient(“https://fibonatix.testrail.io”);
After Dbug the full URL is :
https://fibonatix.testrail.io/index.php?/api/v2/add_result_for_case/4/1239

Need help with this issue, please

The code :
public void test()
{

            string cvvv = "333";
            bool newww = _channelValidations.CdfIsEmptyOrInvalid(cvvv);
            Assert.False(newww, "CVV number is invalid");

            var data = new Dictionary<string, object>
            {
                {"status_id", 1},
                {"comment", "This test worked fine!"}
            };
            JObject r = (JObject) _client.SendPost("add_result_for_case/4/1239", data);

@Summer

Hey,

Thanks for your post and welcome to the TestRail Community.

Kindly send us an email to contact@gurock.com ? We would be happy to assist you.

Thanks,
Shanu