Search in sources :

Example 1 with TestCasesSettings

use of com.google.cloud.dialogflow.cx.v3.TestCasesSettings in project java-dialogflow-cx by googleapis.

the class ListTestCaseResults method listTestCaseResults.

public static void listTestCaseResults(String projectId, String agentId, String testId, String location) throws IOException {
    String parent = "projects/" + projectId + "/locations/" + location + "/agents/" + agentId + "/testCases/" + testId;
    Builder req = ListTestCaseResultsRequest.newBuilder();
    req.setParent(parent);
    req.setFilter("environment=draft");
    TestCasesSettings testCasesSettings = TestCasesSettings.newBuilder().setEndpoint(location + "-dialogflow.googleapis.com:443").build();
    TestCasesClient client = TestCasesClient.create(testCasesSettings);
    for (TestCaseResult element : client.listTestCaseResults(req.build()).iterateAll()) {
        System.out.println(element);
    }
}
Also used : TestCasesSettings(com.google.cloud.dialogflow.cx.v3.TestCasesSettings) TestCaseResult(com.google.cloud.dialogflow.cx.v3.TestCaseResult) Builder(com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest.Builder) TestCasesClient(com.google.cloud.dialogflow.cx.v3.TestCasesClient)

Aggregations

Builder (com.google.cloud.dialogflow.cx.v3.ListTestCaseResultsRequest.Builder)1 TestCaseResult (com.google.cloud.dialogflow.cx.v3.TestCaseResult)1 TestCasesClient (com.google.cloud.dialogflow.cx.v3.TestCasesClient)1 TestCasesSettings (com.google.cloud.dialogflow.cx.v3.TestCasesSettings)1