From 39116c7da381ff5e5b2ce7ae80f103dfc77c0253 Mon Sep 17 00:00:00 2001 From: atulpurohit Date: Fri, 1 Nov 2019 15:01:03 +0530 Subject: Unique identifier for test execution Issue-ID: SDC-2584 Co-authored-by: nikhil.soni@vodafone.com Signed-off-by: atulpurohit Change-Id: I3e7f1a84935cbcd26f8a42a6e2d2dbcb7533cb19 Signed-off-by: atulpurohit --- .../api/ExternalTestingManager.java | 174 ++++++++++++--------- .../api/VtpTestExecutionOutput.java | 32 ++++ 2 files changed, 130 insertions(+), 76 deletions(-) create mode 100644 openecomp-be/lib/openecomp-sdc-externaltesting-lib/openecomp-sdc-externaltesting-api/src/main/java/org/openecomp/core/externaltesting/api/VtpTestExecutionOutput.java (limited to 'openecomp-be/lib/openecomp-sdc-externaltesting-lib/openecomp-sdc-externaltesting-api') diff --git a/openecomp-be/lib/openecomp-sdc-externaltesting-lib/openecomp-sdc-externaltesting-api/src/main/java/org/openecomp/core/externaltesting/api/ExternalTestingManager.java b/openecomp-be/lib/openecomp-sdc-externaltesting-lib/openecomp-sdc-externaltesting-api/src/main/java/org/openecomp/core/externaltesting/api/ExternalTestingManager.java index ac2f7fcafa..21d09edc91 100644 --- a/openecomp-be/lib/openecomp-sdc-externaltesting-lib/openecomp-sdc-externaltesting-api/src/main/java/org/openecomp/core/externaltesting/api/ExternalTestingManager.java +++ b/openecomp-be/lib/openecomp-sdc-externaltesting-lib/openecomp-sdc-externaltesting-api/src/main/java/org/openecomp/core/externaltesting/api/ExternalTestingManager.java @@ -18,82 +18,104 @@ 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 getEndpoints(); - - - /** - * For functional testing purposes, allow the endpoint configuration - * to be provisioned to the BE. - */ - List setEndpoints(List endpoints); - - /** - * Get a list of scenarios from and endpoint. - */ - List getScenarios(String endpoint); - - /** - * Get a list of test suites given the endpoint and scenario. - */ - List 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 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. - * @return response from endpoint (don't bother to parse). - */ - List execute(List requests, String requestId); - - /** - * Return a previous results. - * @param endpoint endpoint to query - * @param executionId execution to query. - * @return response from endpoint. - */ - VtpTestExecutionResponse getExecution(String endpoint, String executionId); - -} + /** + * 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 getEndpoints(); + + + /** + * For functional testing purposes, allow the endpoint configuration + * to be provisioned to the BE. + */ + List setEndpoints(List endpoints); + + /** + * Get a list of scenarios from and endpoint. + */ + List getScenarios(String endpoint); + + /** + * Get a list of test suites given the endpoint and scenario. + */ + List 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 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 execute(List requests, String vspId, String vspVersionId, + String requestId, Map 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 getExecutionIds(String endpoint, String requestId); + + +} \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-externaltesting-lib/openecomp-sdc-externaltesting-api/src/main/java/org/openecomp/core/externaltesting/api/VtpTestExecutionOutput.java b/openecomp-be/lib/openecomp-sdc-externaltesting-lib/openecomp-sdc-externaltesting-api/src/main/java/org/openecomp/core/externaltesting/api/VtpTestExecutionOutput.java new file mode 100644 index 0000000000..e59fb6008a --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-externaltesting-lib/openecomp-sdc-externaltesting-api/src/main/java/org/openecomp/core/externaltesting/api/VtpTestExecutionOutput.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2019 Vodafone Group + * + * 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 lombok.Data; + +@Data +public class VtpTestExecutionOutput { + + private String scenario; + private String testCaseName; + private String testSuiteName; + private String executionId; + private String requestId; + private String status; + private String startTime; + private String endTime; +} \ No newline at end of file -- cgit 1.2.3-korg