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

API Connection in Testrail


#1

public static void main(String[] args) throws Exception
{

	APIClient client = new APIClient("https://fhlbatlanta.testrail.net");
	client.setUser("sbabu@fhlbatl.com");
	client.setPassword("test1234");
	
	JSONObject c = (JSONObject) client.sendGet("get_case/288");
	System.out.println(c.get("title"));
	Map data = new HashMap();
	data.put("status_id", new Integer(1));
	//data.put("comment", "This test worked fine!");
	JSONObject r = (JSONObject) client.sendPost("add_result_for_case/51/288", data);
	
}

}

getting COnnection Timedout Exception error message


#2

In Local machine it is working fine, in Client Machine we are getting Connection Timed out Exception
Is there any possibility to block api in fire wall.

Thanks in Advance


#3

Hi nandini,

Thanks for your posting. Could you check if the machine is allowed to make outgoing HTTP/HTTPS requests? Your code and the configuration looks good and this may be an issue with a local/outgoing firewall or something similar.

Cheers,
Tobias