I am writing test case using jayway. I am getting connection refused error.
@RunWith(OrderitoJUnitRunner.class)
public class TestOrderService extends TestCaseSrs {
@Test
public void testFindUsingGroovyClosure() throws IOException
{
RestAssured.baseURI = "http://localhost";
String responseString = "Some Json";
String json = get("/test/Order/").asString();
JsonPath jp = new JsonPath(json);
String ssn = jp.get("customer.personId");
assertEquals("123456", ssn);
}
}
Error:
java.net.ConnectException: Connection refused: connect
Connect to localhost:8080 timed out. Connection will be retried using another IP address
Am I doing anything wrong?