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;
23 public interface ExternalTestingManager {
26 * Return the configuration of this feature that we want to
27 * expose to the client. Treated as a JSON blob for flexibility.
29 ClientConfiguration getConfig();
32 * For testing purposes, set the client configuration.
34 ClientConfiguration setConfig(ClientConfiguration config);
37 * Build a tree of all test cases for the client including all
38 * defined endpoints, scenarios, and test suites.
40 * @return test case tree.
42 TestTreeNode getTestCasesAsTree();
45 * Get a list of testing endpoints.
47 List<RemoteTestingEndpointDefinition> getEndpoints();
51 * For functional testing purposes, allow the endpoint configuration
52 * to be provisioned to the BE.
54 List<RemoteTestingEndpointDefinition> setEndpoints(List<RemoteTestingEndpointDefinition> endpoints);
57 * Get a list of scenarios from and endpoint.
59 List<VtpNameDescriptionPair> getScenarios(String endpoint);
62 * Get a list of test suites given the endpoint and scenario.
64 List<VtpNameDescriptionPair> getTestSuites(String endpoint, String scenario);
67 * Get a list of test cases.
69 * @param endpoint endpoint to contact (e.g. VTP)
70 * @param scenario test scenario to get tests for
71 * @return list of test cases.
73 List<VtpTestCase> getTestCases(String endpoint, String scenario);
76 * Get the details about a particular test case.
78 * @param endpoint endpoint to contact (e.g. VTP)
79 * @param scenario test scenario to get tests for
80 * @param testSuite suite to get tests for
81 * @param testCaseName test case name to query.
82 * @return details about the test case.
84 VtpTestCase getTestCase(String endpoint, String scenario, String testSuite, String testCaseName);
87 * Execute a collection of tests where the manager must distribute
88 * the tests to the appropriate endpoint and correlate the responses.
90 * @param requests collection of request items.
91 * @param requestId optional request ID provided from client.
92 * @param vspVersionId vsp version id
93 * @param requestId request id
94 * @param fileMap file map
95 * @return response from endpoint (don't bother to parse).
98 List<VtpTestExecutionResponse> execute(List<VtpTestExecutionRequest> requests, String vspId, String vspVersionId,
99 String requestId, Map<String, byte[]> fileMap);
103 * Return a previous results.
105 * @param endpoint endpoint to query
106 * @param executionId execution to query.
107 * @return response from endpoint.
109 VtpTestExecutionResponse getExecution(String endpoint, String executionId);
112 * Get ExceutionIds by requestId
116 * @return response from endpoint
118 List<VtpTestExecutionOutput> getExecutionIds(String endpoint, String requestId);