ID 列表 - ALM API 自动化

list of ids - ALM API Automation

我正在 api 使用放心的 n java.For 多次运行的测试用例进行 hp-alm 自动化,我在 xml format.I 中得到以下响应想要了解 id 属性列表及其值。

enter image description here

RequestSpecification httpRequest10 = RestAssured.given().cookies(loginCookies).cookies(sessionCookies).queryParam("query", "{cycle-id["+cycleId+"];test-id["+testCaseId+"]}");

        Response testRunId = httpRequest10.request(Method.GET,"/qcbin/rest/domains/"+domain+"/projects/"+project+"/runs");
                String testRunIdResponseBody = testRunId.getBody().asString();
                //logger.info("testRunId Response Body is =>  " + testRunIdResponseBody);//test run details in xml format
                statusCode = testRunId.getStatusCode();
                //logger.info("The testRunId status code recieved: " + statusCode);
                String stepID= testRunId.xmlPath().from(testRunIdResponseBody).get("**.find {it.@Name == 'id'}.Value");
                List<String> runIds = testRunId.xmlPath().from(testRunIdResponseBody).getList("**.find {it.@Name == 'id'}.Value");
                logger.info("stepID"+stepID);

使用上面的代码我可以得到第一个 id 但不能得到 id 列表

我想 **.find 应该替换为 **.findAll:

List<String> runIds = testRunId.xmlPath().from(testRunIdResponseBody).getList("**.findAll {it.@Name == 'id'}.Value");