我是 Zapi(Zephyr API)的新手。我正在尝试评估 Zapi API 以自动更新测试用例结果。在尝试使用它获取有关测试用例的详细信息时,我在控制台上收到“请登录”消息。我正在尝试从以下链接使用 Zapi Rest API: http ://docs.getzephyr.apiary.io/ 。
下面是我用来获取特定测试用例详细信息的代码:
Client client = ClientBuilder.newClient();
Response response = client.target("https://SERVER_NAME").path("/jira/browse/DEV-3121").request(MediaType.APPLICATION_JSON_TYPE).get();
System.out.println("status: " + response.getStatus());
System.out.println("headers: " + response.getHeaders());
System.out.println("body:" + response.readEntity(String.class));
我在控制台上收到以下消息:
<fieldset class="hidden parameters">
<input type="hidden" title="loggedInUser" value="">
<input type="hidden" title="ajaxTimeout" value="The call to the JIRA server did not complete within the timeout period. We are unsure of the result of this operation.">
<input type="hidden" title="JiraVersion" value="6.2.7" />
<input type="hidden" title="ajaxUnauthorised" value="You are not authorized to perform this operation. Please log in.">
<fieldset/>
请让我知道,我在这里缺少什么,否则我可以通过任何其他方式获取测试用例的详细信息或更新 Jira-Zephyr 中的任何测试用例。
谢谢。