我正在使用 jayway 编写测试用例。我收到连接被拒绝错误。
@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);
}
}
错误:
java.net.ConnectException: Connection refused: connect
Connect to localhost:8080 timed out. Connection will be retried using another IP address
我做错什么了吗?