You can follow API docs from Testrail:
http://docs.gurock.com/testrail-api2/start
and have to create Your own RESTful service that will lean against Testrail API's.
I've created connection to Testrail with their docs, with additon of JSON (class) models for each of this actions.
For eg. fetching testcases
request:
GET index.php?/api/v2/get_test/:test_id
response:
response:
{
"assignedto_id": 1,
"case_id": 1,
"custom_expected": "..",
"custom_preconds": "..",
"custom_steps_separated": [
{
"content": "Step 1",
"expected": "Expected Result 1"
},
{
"content": "Step 2",
"expected": "Expected Result 2"
}
],
"estimate": "1m 5s",
"estimate_forecast": null,
"id": 100,
"priority_id": 2,
"run_id": 1,
"status_id": 5,
"title": "Verify line spacing on multi-page document",
"type_id": 4
}
json model:
public class Test {
private static final String CUSTOM_FIELD_KEY_PREFIX = "custom_";
private int id;
private int caseId;
private Integer assignedtoId;
private String title;
private int statusId;
private int typeId;
private int priorityId;
private Integer milestoneId;
private Integer runId;
private String refs;
private String estimate;
private String estimateForecast;
private Map<String, Object> customFields;
public Map<String, Object> getCustomFields() {
return customFields;
}
But probably the easiest way is to directly send request and parse response and create a small service around it.