5
我正在使用Rest-Assured来测试我的Rest API。 web服务似乎是确定运行,运行以来不能正常工作的请求
curl -u "admin:admin" http://localhost:8888/users/
让我的用户为JSON。
然后,尝试与休息,放心
RestAssured.authentication = basic("admin", "admin");
expect().statusCode(200).when().get("http://localhost:8888/users/");
一个简单的请求时,给我的输出
Exception in thread "main" org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:8888 refused
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:158)
…
可这有什么呢?