Im trying to create a java post request to create a test run on test rail, however it doesn't seem to be working heres my code:
public class create_run {
public JSONObject AddTestRunTest() throws IOException, APIException {
JSONObject jsonobject = new JSONObject();
APIClient client = new APIClient("https://stdec.testrail.com/");
client.setUser("fea@sportdec.com");
client.setPassword("Fa1");
Map<String, Object> map = new HashMap<String, Object>();
map.put("suite_id", 829);
map.put("assignedto_id", 1);
map.put("name", "Regression Test");
map.put("include_all", true);
map.put({"17082","17085"});
client.sendPost("index.php?/api/v2/add_run/24", map);
return jsonobject;
}
}
The testrail documentation is here im looking for the add run http://docs.gurock.com/testrail-api2/reference-runs Any help here how to make this actually work , is completing but nothing is happening. I'm a tester but struggling with this pat of the Java