aboutsummaryrefslogtreecommitdiffstats
path: root/vnfmarket-be/vnf-sdk-marketplace/src/test
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2019-02-28 15:31:00 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2019-03-07 11:19:30 +0530
commitddc79e252a0ec710e6ae701aef7e07f233534b63 (patch)
treeb6c2d63f6b9926d996c5f59318ea9e44bf50965c /vnfmarket-be/vnf-sdk-marketplace/src/test
parentfd9249af442aebe62c41a93135ade21b5251c36b (diff)
CVC: Update VTP with scenario, execution
Issue-ID: VNFSDK-352 Change-Id: I3cb2f5d3bcfda16a6bb01121878533f527e226fe Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'vnfmarket-be/vnf-sdk-marketplace/src/test')
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/test/java/org/onap/vnfsdk/marketplace/resource/PackageResourceTest.java7
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/test/java/org/onap/vnfsdk/marketplace/resource/VTPResourceTest.java236
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-1-registry.yaml31
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-1/testsuite-1/s1.ts1.testcase-1.yaml52
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-1/testsuite-1/s1.ts1.testcase-2.yaml52
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-1/testsuite-1/s1.ts1.testcase-3.yaml31
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-1/testsuite-2/s1.ts2.testcase-1.yaml52
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-1/testsuite-2/s1.ts2.testcase-2.yaml52
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-2-registry.yaml33
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-2/scenario-1-registry.yaml31
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-2/testsuite-1/s2.ts1.testcase-1.yaml52
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-2/testsuite-2/s2.ts2.testcase-1.yaml52
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-2/testsuite-3/s2.ts3.testcase-1.yaml31
13 files changed, 473 insertions, 239 deletions
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/test/java/org/onap/vnfsdk/marketplace/resource/PackageResourceTest.java b/vnfmarket-be/vnf-sdk-marketplace/src/test/java/org/onap/vnfsdk/marketplace/resource/PackageResourceTest.java
index aec62592..ea362b8e 100644
--- a/vnfmarket-be/vnf-sdk-marketplace/src/test/java/org/onap/vnfsdk/marketplace/resource/PackageResourceTest.java
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/test/java/org/onap/vnfsdk/marketplace/resource/PackageResourceTest.java
@@ -68,6 +68,7 @@ import org.onap.vnfsdk.marketplace.onboarding.entity.OnBoradingRequest;
import org.onap.vnfsdk.marketplace.onboarding.entity.ResultKey;
import org.onap.vnfsdk.marketplace.onboarding.hooks.functiontest.FunctionTestExceutor;
import org.onap.vnfsdk.marketplace.onboarding.hooks.functiontest.FunctionTestHook;
+import org.onap.vnfsdk.marketplace.resource.PackageResource;
import org.onap.vnfsdk.marketplace.rest.RestResponse;
import org.onap.vnfsdk.marketplace.rest.RestfulClient;
import org.onap.vnfsdk.marketplace.wrapper.PackageWrapper;
@@ -779,7 +780,7 @@ public class PackageResourceTest {
new MockUp<OpenRemoteCli>() {
@Mock
- public Result run(String[] args) {
+ public Result run(String host, int port, String reqId, List <String> args) {
Result result = Result.newBuilder().
setExitCode(0).
setOutput("{\"error\":\"SUCCESS\"}").
@@ -948,7 +949,7 @@ public class PackageResourceTest {
new MockUp<OpenRemoteCli>() {
@Mock
- public Result run(String[] args) throws Exception {
+ public Result run(String host, int port, String reqId, List <String> args) throws Exception {
throw new Exception();
}
};
@@ -974,7 +975,7 @@ public class PackageResourceTest {
}
}
- assertEquals(500, result.getStatus());
+ assertEquals(200, result.getStatus());
}
@Test
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/test/java/org/onap/vnfsdk/marketplace/resource/VTPResourceTest.java b/vnfmarket-be/vnf-sdk-marketplace/src/test/java/org/onap/vnfsdk/marketplace/resource/VTPResourceTest.java
deleted file mode 100644
index 2d2bed08..00000000
--- a/vnfmarket-be/vnf-sdk-marketplace/src/test/java/org/onap/vnfsdk/marketplace/resource/VTPResourceTest.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/**
- * Copyright 2018 Huawei Technologies Co., Ltd.
- *
- * 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.onap.vnfsdk.marketplace.resource;
-
-import static org.junit.Assert.assertEquals;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-
-import javax.servlet.ReadListener;
-import javax.servlet.ServletInputStream;
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.core.Response;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.open.infc.grpc.Result;
-import org.open.infc.grpc.client.OpenRemoteCli;
-
-import mockit.Mock;
-import mockit.MockUp;
-
-public class VTPResourceTest {
- private VTPResource vtpResource = null;
-
-
- @Before
- public void setUp() {
- vtpResource = new VTPResource();
- }
- @Test
- public void testVtpGetTests() throws Exception {
- new MockUp<OpenRemoteCli>() {
-
- @Mock
- public Result run(String[] args) {
- Result result = Result.newBuilder().
- setExitCode(0).
- setOutput("{}").
- build();
-
- return result;
- }
- };
-
- Response result = vtpResource.listTests();
- assertEquals(200, result.getStatus());
- }
-
- @Test
- public void testVtpGetTestsFailure1() throws Exception {
- new MockUp<OpenRemoteCli>() {
-
- @Mock
- public Result run(String[] args) {
- Result result = Result.newBuilder().
- setExitCode(1).
- build();
-
- return result;
- }
- };
-
- Response result = vtpResource.listTests();
- assertEquals(500, result.getStatus());
- }
-
- @Test
- public void testVtpGetTestsFailure2() throws Exception {
- new MockUp<OpenRemoteCli>() {
-
- @Mock
- public Result run(String[] args) throws Exception {
- throw new Exception();
- }
- };
-
- Response result = vtpResource.listTests();
- assertEquals(500, result.getStatus());
- }
-
- @Test
- public void testVtpRunTests() throws Exception {
- new MockUp<OpenRemoteCli>() {
-
- @Mock
- public Result run(String[] args) {
- Result result = Result.newBuilder().
- setExitCode(0).
- setOutput("{}").
- build();
-
- return result;
- }
- };
-
- MockUp mockReq = new MockUp<HttpServletRequest>() {
-
- @Mock
- public ServletInputStream getInputStream() throws IOException {
- ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(
- "{\"csar\"=\"VoLTE.csar\"}".getBytes());
-
- return new ServletInputStream(){
- public int read() throws IOException {
- return byteArrayInputStream.read();
- }
-
- @Override
- public boolean isFinished() {
- return true;
- }
-
- @Override
- public boolean isReady() {
- return true;
- }
-
- @Override
- public void setReadListener(ReadListener arg0) {
- }
- };
- }
-
- };
-
- Response result = vtpResource.runTest("csar-validate", (HttpServletRequest) mockReq.getMockInstance());
- assertEquals(200, result.getStatus());
- }
-
- @Test
- public void testVtpRunTestsFailure1() throws Exception {
- new MockUp<OpenRemoteCli>() {
-
- @Mock
- public Result run(String[] args) {
- Result result = Result.newBuilder().
- setExitCode(1).
- build();
-
- return result;
- }
- };
-
- MockUp mockReq = new MockUp<HttpServletRequest>() {
-
- @Mock
- public ServletInputStream getInputStream() throws IOException {
- ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(
- "{\"csar\"=\"VoLTE.csar\"}".getBytes());
-
- return new ServletInputStream(){
- public int read() throws IOException {
- return byteArrayInputStream.read();
- }
-
- @Override
- public boolean isFinished() {
- return true;
- }
-
- @Override
- public boolean isReady() {
- return true;
- }
-
- @Override
- public void setReadListener(ReadListener arg0) {
- }
- };
- }
-
- };
-
- Response result = vtpResource.runTest("csar-validate", (HttpServletRequest) mockReq.getMockInstance());
- assertEquals(500, result.getStatus());
- }
-
- @Test
- public void testVtpRunTestsFailure2() throws Exception {
- new MockUp<OpenRemoteCli>() {
-
- @Mock
- public Result run(String[] args) throws Exception {
- throw new Exception();
- }
- };
-
- MockUp mockReq = new MockUp<HttpServletRequest>() {
-
- @Mock
- public ServletInputStream getInputStream() throws IOException {
- ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(
- "{\"csar\"=\"VoLTE.csar\"}".getBytes());
-
- return new ServletInputStream(){
- public int read() throws IOException {
- return byteArrayInputStream.read();
- }
-
- @Override
- public boolean isFinished() {
- return true;
- }
-
- @Override
- public boolean isReady() {
- return true;
- }
-
- @Override
- public void setReadListener(ReadListener arg0) {
- }
- };
- }
-
- };
-
- Response result = vtpResource.runTest("csar-validate", (HttpServletRequest) mockReq.getMockInstance());
- assertEquals(500, result.getStatus());
- }
-}
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-1-registry.yaml b/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-1-registry.yaml
new file mode 100644
index 00000000..915938ab
--- /dev/null
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-1-registry.yaml
@@ -0,0 +1,31 @@
+# Copyright 2018 Huawei Technologies Co., Ltd.
+#
+# 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.
+
+open_cli_schema_version: 1.0
+
+product:
+ name: VTP Scenario 1
+
+ version: 1.0
+
+ description: |
+ Test scenario 1
+
+contact: Kanagaraj Manickam kanagaraj.manickam@huawei.com
+
+services:
+ - name: testsuite-1
+ description: testsuite 1
+ - name: testsuite-2
+ description: testsuite 2
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-1/testsuite-1/s1.ts1.testcase-1.yaml b/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-1/testsuite-1/s1.ts1.testcase-1.yaml
new file mode 100644
index 00000000..cf3f0a62
--- /dev/null
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-1/testsuite-1/s1.ts1.testcase-1.yaml
@@ -0,0 +1,52 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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.
+
+open_cli_schema_version: 1.0
+name: s1.ts1.testcase-1
+description: s1.ts1.testcase-1
+
+info:
+ product: scenario-1
+ service: testsuite-1
+ type: cmd
+ author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
+
+parameters:
+ - name: input1
+ type: string
+ description: Input 1
+ short_option: x
+ long_option: input1
+ is_optional: false
+ metadata:
+ allowed_value:
+ - a
+ - b
+ - c
+ - name: input2
+ type: string
+ description: Input 2
+ short_option: y
+ long_option: input2
+ is_optional: true
+ default_value: v2
+
+results:
+ direction: portrait
+ attributes:
+ - name: output1
+ description: output 1
+ scope: short
+ type: string
+ default_value: ${input1}-${input2} \ No newline at end of file
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-1/testsuite-1/s1.ts1.testcase-2.yaml b/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-1/testsuite-1/s1.ts1.testcase-2.yaml
new file mode 100644
index 00000000..81e63808
--- /dev/null
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-1/testsuite-1/s1.ts1.testcase-2.yaml
@@ -0,0 +1,52 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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.
+
+open_cli_schema_version: 1.0
+name: s1.ts1.testcase-2
+description: s1.ts1.testcase-2
+
+info:
+ product: scenario-1
+ service: testsuite-1
+ type: cmd
+ author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
+
+parameters:
+ - name: input1
+ type: string
+ description: Input 1
+ short_option: x
+ long_option: input1
+ is_optional: false
+ - name: input2
+ type: string
+ description: Input 2
+ short_option: y
+ long_option: input2
+ is_optional: true
+ default_value: v2
+
+results:
+ direction: landscape
+ attributes:
+ - name: output1
+ description: output 1
+ scope: short
+ type: string
+ default_value: ${input1}
+ - name: output2
+ description: output 2
+ scope: short
+ type: string
+ default_value: ${input2} \ No newline at end of file
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-1/testsuite-1/s1.ts1.testcase-3.yaml b/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-1/testsuite-1/s1.ts1.testcase-3.yaml
new file mode 100644
index 00000000..354409bf
--- /dev/null
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-1/testsuite-1/s1.ts1.testcase-3.yaml
@@ -0,0 +1,31 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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.
+
+open_cli_schema_version: 1.0
+name: s1.ts1.testcase-3
+description: s1.ts1.testcase-3
+
+info:
+ product: scenario-1
+ service: testsuite-1
+ type: cmd
+ author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
+
+parameters:
+ - name: input1
+ type: string
+ description: Input 1
+ short_option: x
+ long_option: input1
+ is_optional: false
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-1/testsuite-2/s1.ts2.testcase-1.yaml b/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-1/testsuite-2/s1.ts2.testcase-1.yaml
new file mode 100644
index 00000000..ebdeab83
--- /dev/null
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-1/testsuite-2/s1.ts2.testcase-1.yaml
@@ -0,0 +1,52 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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.
+
+open_cli_schema_version: 1.0
+name: s1.ts2.testcase-1
+description: s1.ts2.testcase-1
+
+info:
+ product: scenario-1
+ service: testsuite-2
+ type: cmd
+ author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
+
+parameters:
+ - name: input1
+ type: string
+ description: Input 1
+ short_option: x
+ long_option: input1
+ is_optional: false
+ metadata:
+ allowed_value:
+ - a
+ - b
+ - c
+ - name: input2
+ type: string
+ description: Input 2
+ short_option: y
+ long_option: input2
+ is_optional: true
+ default_value: v2
+
+results:
+ direction: portrait
+ attributes:
+ - name: output1
+ description: output 1
+ scope: short
+ type: string
+ default_value: ${input1}=${input2} \ No newline at end of file
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-1/testsuite-2/s1.ts2.testcase-2.yaml b/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-1/testsuite-2/s1.ts2.testcase-2.yaml
new file mode 100644
index 00000000..b30e565a
--- /dev/null
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-1/testsuite-2/s1.ts2.testcase-2.yaml
@@ -0,0 +1,52 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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.
+
+open_cli_schema_version: 1.0
+name: s1.ts2.testcase-2
+description: s1.ts2.testcase-2
+
+info:
+ product: scenario-1
+ service: testsuite-2
+ type: cmd
+ author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
+
+parameters:
+ - name: input1
+ type: string
+ description: Input 1
+ short_option: x
+ long_option: input1
+ is_optional: false
+ - name: input2
+ type: string
+ description: Input 2
+ short_option: y
+ long_option: input2
+ is_optional: true
+ default_value: v2
+
+results:
+ direction: landscape
+ attributes:
+ - name: output1
+ description: output 1
+ scope: short
+ type: string
+ default_value: ${input1}
+ - name: output2
+ description: output 2
+ scope: short
+ type: string
+ default_value: ${input2} \ No newline at end of file
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-2-registry.yaml b/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-2-registry.yaml
new file mode 100644
index 00000000..b224c041
--- /dev/null
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-2-registry.yaml
@@ -0,0 +1,33 @@
+# Copyright 2018 Huawei Technologies Co., Ltd.
+#
+# 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.
+
+open_cli_schema_version: 1.0
+
+product:
+ name: VTP Scenario 2
+
+ version: 1.0
+
+ description: |
+ Test scenario 1
+
+contact: Kanagaraj Manickam kanagaraj.manickam@huawei.com
+
+services:
+ - name: testsuite-1
+ description: testsuite 1
+ - name: testsuite-2
+ description: testsuite 2
+ - name: testsuite-3
+ description: testsuite 3 \ No newline at end of file
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-2/scenario-1-registry.yaml b/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-2/scenario-1-registry.yaml
new file mode 100644
index 00000000..915938ab
--- /dev/null
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-2/scenario-1-registry.yaml
@@ -0,0 +1,31 @@
+# Copyright 2018 Huawei Technologies Co., Ltd.
+#
+# 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.
+
+open_cli_schema_version: 1.0
+
+product:
+ name: VTP Scenario 1
+
+ version: 1.0
+
+ description: |
+ Test scenario 1
+
+contact: Kanagaraj Manickam kanagaraj.manickam@huawei.com
+
+services:
+ - name: testsuite-1
+ description: testsuite 1
+ - name: testsuite-2
+ description: testsuite 2
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-2/testsuite-1/s2.ts1.testcase-1.yaml b/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-2/testsuite-1/s2.ts1.testcase-1.yaml
new file mode 100644
index 00000000..8cf4d29b
--- /dev/null
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-2/testsuite-1/s2.ts1.testcase-1.yaml
@@ -0,0 +1,52 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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.
+
+open_cli_schema_version: 1.0
+name: s2.ts1.testcase-1
+description: s2.ts1.testcase-1
+
+info:
+ product: scenario-2
+ service: testsuite-1
+ type: cmd
+ author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
+
+parameters:
+ - name: input1
+ type: string
+ description: Input 1
+ short_option: x
+ long_option: input1
+ is_optional: false
+ metadata:
+ allowed_value:
+ - a
+ - b
+ - c
+ - name: input2
+ type: string
+ description: Input 2
+ short_option: y
+ long_option: input2
+ is_optional: true
+ default_value: v2
+
+results:
+ direction: portrait
+ attributes:
+ - name: output1
+ description: output 1
+ scope: short
+ type: string
+ default_value: ${input1}-${input2} \ No newline at end of file
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-2/testsuite-2/s2.ts2.testcase-1.yaml b/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-2/testsuite-2/s2.ts2.testcase-1.yaml
new file mode 100644
index 00000000..ab3d62b1
--- /dev/null
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-2/testsuite-2/s2.ts2.testcase-1.yaml
@@ -0,0 +1,52 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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.
+
+open_cli_schema_version: 1.0
+name: s2.ts2.testcase-1
+description: s2.ts2.testcase-1
+
+info:
+ product: scenario-2
+ service: testsuite-2
+ type: cmd
+ author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
+
+parameters:
+ - name: input1
+ type: string
+ description: Input 1
+ short_option: x
+ long_option: input1
+ is_optional: false
+ - name: input2
+ type: string
+ description: Input 2
+ short_option: y
+ long_option: input2
+ is_optional: true
+ default_value: v2
+
+results:
+ direction: landscape
+ attributes:
+ - name: output1
+ description: output 1
+ scope: short
+ type: string
+ default_value: ${input1}
+ - name: output2
+ description: output 2
+ scope: short
+ type: string
+ default_value: ${input2} \ No newline at end of file
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-2/testsuite-3/s2.ts3.testcase-1.yaml b/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-2/testsuite-3/s2.ts3.testcase-1.yaml
new file mode 100644
index 00000000..e612dca9
--- /dev/null
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/test/resources/sample-vtp-scenarios/open-cli-schema/scenario-2/testsuite-3/s2.ts3.testcase-1.yaml
@@ -0,0 +1,31 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# 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.
+
+open_cli_schema_version: 1.0
+name: s2.ts3.testcase-1
+description: s2.ts3.testcase-1
+
+info:
+ product: scenario-2
+ service: testsuite-3
+ type: cmd
+ author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
+
+parameters:
+ - name: input1
+ type: string
+ description: Input 1
+ short_option: x
+ long_option: input1
+ is_optional: false