1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
/*
* Copyright © 2019 iconectiv
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openecomp.core.externaltesting.api;
import java.util.List;
import java.util.Map;
public interface ExternalTestingManager {
/**
* Return the configuration of this feature that we want to
* expose to the client. Treated as a JSON blob for flexibility.
*/
ClientConfiguration getConfig();
/**
* For testing purposes, set the client configuration.
*/
ClientConfiguration setConfig(ClientConfiguration config);
/**
* Build a tree of all test cases for the client including all
* defined endpoints, scenarios, and test suites.
*
* @return test case tree.
*/
TestTreeNode getTestCasesAsTree();
/**
* Get a list of testing endpoints.
*/
List<RemoteTestingEndpointDefinition> getEndpoints();
/**
* For functional testing purposes, allow the endpoint configuration
* to be provisioned to the BE.
*/
List<RemoteTestingEndpointDefinition> setEndpoints(List<RemoteTestingEndpointDefinition> endpoints);
/**
* Get a list of scenarios from and endpoint.
*/
List<VtpNameDescriptionPair> getScenarios(String endpoint);
/**
* Get a list of test suites given the endpoint and scenario.
*/
List<VtpNameDescriptionPair> getTestSuites(String endpoint, String scenario);
/**
* Get a list of test cases.
*
* @param endpoint endpoint to contact (e.g. VTP)
* @param scenario test scenario to get tests for
* @return list of test cases.
*/
List<VtpTestCase> getTestCases(String endpoint, String scenario);
/**
* Get the details about a particular test case.
*
* @param endpoint endpoint to contact (e.g. VTP)
* @param scenario test scenario to get tests for
* @param testSuite suite to get tests for
* @param testCaseName test case name to query.
* @return details about the test case.
*/
VtpTestCase getTestCase(String endpoint, String scenario, String testSuite, String testCaseName);
/**
* Execute a collection of tests where the manager must distribute
* the tests to the appropriate endpoint and correlate the responses.
*
* @param requests collection of request items.
* @param requestId optional request ID provided from client.
* @param vspVersionId vsp version id
* @param requestId request id
* @param fileMap file map
* @return response from endpoint (don't bother to parse).
*/
List<VtpTestExecutionResponse> execute(List<VtpTestExecutionRequest> requests, String vspId, String vspVersionId,
String requestId, Map<String, byte[]> fileMap);
/**
* Return a previous results.
*
* @param endpoint endpoint to query
* @param executionId execution to query.
* @return response from endpoint.
*/
VtpTestExecutionResponse getExecution(String endpoint, String executionId);
/**
* Get ExceutionIds by requestId
*
* @param endpoint
* @param requestId
* @return response from endpoint
*/
List<VtpTestExecutionOutput> getExecutionIds(String endpoint, String requestId);
}
|