Test Case 040 Verify Parser Yang-to-Tosca 73/6173/1
authorkubi <jean.gaoliang@huawei.com>
Mon, 11 Jan 2016 13:30:45 +0000 (21:30 +0800)
committerqi liang <liangqi1@huawei.com>
Mon, 11 Jan 2016 14:21:36 +0000 (14:21 +0000)
running Parser Yang-to-Tosca module as a tool, validating output against expected outcome.
this patch is about task yaml and rst for test case description.
JIRA:YARDSTICK-224

Signed-off-by: kubi <jean.gaoliang@huawei.com>
Change-Id: Id254c5cf45de33b023bef889a58044a21ed0db43
Signed-off-by: kubi <jean.gaoliang@huawei.com>
(cherry picked from commit 45e85a7f6df63ca4ca702f519ca19e5bcbb1bc23)

docs/configguide/yardstick_testcases/03-list-of-tcs.rst
docs/configguide/yardstick_testcases/opnfv_yardstick_tc040.rst [new file with mode: 0644]
tests/opnfv/test_cases/opnfv_yardstick_tc040.yaml [new file with mode: 0644]

index 944cc4d..d801bf9 100644 (file)
@@ -29,6 +29,7 @@ Generic NFVI Test Case Descriptions
    opnfv_yardstick_tc012.rst
    opnfv_yardstick_tc037.rst
    opnfv_yardstick_tc038.rst
+   opnfv_yardstick_tc040.rst
 
 OPNFV Feature Test Cases
 ========================
diff --git a/docs/configguide/yardstick_testcases/opnfv_yardstick_tc040.rst b/docs/configguide/yardstick_testcases/opnfv_yardstick_tc040.rst
new file mode 100644 (file)
index 0000000..044ccf1
--- /dev/null
@@ -0,0 +1,60 @@
+*************************************
+Yardstick Test Case Description TC040
+*************************************
+
+.. _Parser: https://wiki.opnfv.org/parser
+
++-----------------------------------------------------------------------------+
+|Verify Parser Yang-to-Tosca                                                  |
+|                                                                             |
++--------------+--------------------------------------------------------------+
+|test case id  | OPNFV_YARDSTICK_TC040 Verify Parser Yang-to-Tosca            |
+|              |                                                              |
++--------------+--------------------------------------------------------------+
+|metric        | 1. tosca file which is converted from yang file by Parser    |
+|              | 2. result whether the output is same with expected outcome   |
++--------------+--------------------------------------------------------------+
+|test purpose  | To verify the function of Yang-to-Tosca in Parser.           |
+|              |                                                              |
++--------------+--------------------------------------------------------------+
+|configuration | file: opnfv_yardstick_tc040.yaml                             |
+|              |                                                              |
+|              | yangfile: the path of the yangfile which you want to convert |
+|              | toscafile: the path of the toscafile which is your expected  |
+|              | outcome.                                                     |
+|              |                                                              |
++--------------+--------------------------------------------------------------+
+|test tool     | Parser                                                       |
+|              |                                                              |
+|              | (Parser is not part of a Linux distribution, hence it        |
+|              | needs to be installed. As an example see the                 |
+|              | /yardstick/benchmark/scenarios/parser/parser_setup.sh for    |
+|              | how to install it manual. Of course, it will be installed    |
+|              | and uninstalled automatically when you run this test case    |
+|              | by yardstick)                                                |
++--------------+--------------------------------------------------------------+
+|references    | Parser_                                                      |
+|              |                                                              |
+|              |                                                              |
++--------------+--------------------------------------------------------------+
+|applicability | Test can be configured with different path of yangfile and   |
+|              | toscafile to fit your real environment to verify Parser      |
+|              |                                                              |
++--------------+--------------------------------------------------------------+
+|pre-test      |  No POD specific requirements have been identified.          |
+|conditions    |  it can be run without VM                                    |
+|              |                                                              |
++--------------+--------------------------------------------------------------+
+|test sequence | description and expected result                              |
+|              |                                                              |
++--------------+--------------------------------------------------------------+
+|step 1        | parser is installed without VM, running Yang-to-Tosca module |
+|              | to convert yang file to tosca file, validating output against|
+|              | expected outcome.                                            |
+|              |                                                              |
+|              | Result: Logs are stored.                                     |
++--------------+--------------------------------------------------------------+
+|test verdict  | Fails only if output is different with expected outcome      |
+|              | or if there is a test case execution problem.                |
+|              |                                                              |
++--------------+--------------------------------------------------------------+
diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc040.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc040.yaml
new file mode 100644 (file)
index 0000000..0a6dee6
--- /dev/null
@@ -0,0 +1,22 @@
+---
+# Yardstick TC040 config file
+# Running Parser Yang-to-Tosca module as a tool, validating output against expected outcome
+
+schema: "yardstick:task:0.1"
+
+
+scenarios:
+-
+  type: Parser
+  options:
+    yangfile:  /home/opnfv/repos/yardstick/samples/yang.yaml
+    toscafile: /home/opnfv/repos/yardstick//samples/tosca.yaml
+
+  runner:
+    type: Iteration
+    iterations: 1
+    interval: 1
+
+context:
+  type: Dummy
+