1

Is it possible to integrate karate with testrail? I am using below code to call the testrail but not sure how to send the results to testrail for each scenario.

@AfterClass
    public static void after() throws Exception
    {
        APIClient client = new APIClient("http://test.com/testrail");
        client.setUser("test");
        client.setPassword("Password1");
       JSONObject c = (JSONObject) client.sendGet("/get_case/5905");
       System.out.println(c.get("title"));


    }
Peter Thomas
  • 54,465
  • 21
  • 84
  • 248
p.kop15
  • 35
  • 4
  • Does this answer your question? [How to integrate karate with testrail](https://stackoverflow.com/questions/48785037/how-to-integrate-karate-with-testrail) – Mert Ekinci Nov 04 '22 at 21:29

1 Answers1

1

The version 0.7.0.RC4 of Karate has support for an 'after' hook.

Refer to this example for details: hooks.feature

So getting results from Karate is solved using karate.info. How you call TestRail is up to you.

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248