2 * Copyright © 2019 iconectiv
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package org.openecomp.core.externaltesting.api;
20 import java.util.List;
22 public interface ExternalTestingManager {
25 * Return the configuration of this feature that we want to
26 * expose to the client. Treated as a JSON blob for flexibility.
31 * Build a tree of all test cases for the client including all
32 * defined endpoints, scenarios, and test suites.
33 * @return test case tree.
35 TestTreeNode getTestCasesAsTree();
38 * Get a list of testing endpoints with name and description.
40 List<VtpNameDescriptionPair> getEndpoints();
43 * Get a list of scenarios from and endpoint.
45 List<VtpNameDescriptionPair> getScenarios(String endpoint);
48 * Get a list of test suites given the endpoint and scenario.
50 List<VtpNameDescriptionPair> getTestSuites(String endpoint, String scenario);
53 * Get a list of test cases.
54 * @param endpoint endpoint to contact (e.g. VTP)
55 * @param scenario test scenario to get tests for
56 * @return list of test cases.
58 List<VtpTestCase> getTestCases(String endpoint, String scenario);
61 * Get the details about a particular test case.
62 * @param endpoint endpoint to contact (e.g. VTP)
63 * @param scenario test scenario to get tests for
64 * @param testSuite suite to get tests for
65 * @param testCaseName test case name to query.
66 * @return details about the test case.
68 VtpTestCase getTestCase(String endpoint, String scenario, String testSuite, String testCaseName);
71 * Execute a collection of tests where the manager must distribute
72 * the tests to the appropriate endpoint and correlate the responses.
73 * @param requests collection of request items.
74 * @param requestId optional request ID provided from client.
75 * @return response from endpoint (don't bother to parse).
77 List<VtpTestExecutionResponse> execute(List<VtpTestExecutionRequest> requests, String requestId);
80 * Return a previous results.
81 * @param endpoint endpoint to query
82 * @param executionId execution to query.
83 * @return response from endpoint.
85 VtpTestExecutionResponse getExecution(String endpoint, String executionId);