Any given product is made of one or more features/services which are again a combination of multiple functionalities. So it is important to test at each level i.e functionalities, features and product. For testing each of these level, VTP has modelled them as below
These model details are captured together into YAML file along with required scripts.
Consider new test suite name as 'compliance', run below command to create it
cp -R feature1 compliance
sed -i 's/feature1/compliance/g' compliance/build.sh
mv compliance/tc/open-cli-schema/testcase11.yaml compliance/tc/open-cli-schema/compliance-tc-01.yaml
sed -i 's/feature1/compliance/g' compliance/tc/open-cli-schema/compliance-tc-01.yaml
Use 'compliance/tc/open-cli-schema/compliance-tc-01.yaml' as reference to create YAML for each of the test cases. And set the following fields in this YAML:
info.author - Author of the test cases
info.product - Scenario name
At first, decide the test cases at very granular level and create YAML for each of the test cases identified by referring the YAML created in pre-requisites. The set the following fields:
name - Name of the test cases
description - Test case description
parameters - List of Parameters with unique name, unique options, default value, etc
results - If test case produce results, add these sections, otherwise ignore.
4.1. results.attributes - List of output attributes with unique name, descripton etc
4.2 cmd.result_map - For each attributes defined above, fill it with JSONPath of of test case output generated by test scripts. so test script should produce the output in json.
For every test case designed above, implement required scripts under tc/script folder. And this script will read input arguments and execute the required testing and produce the output in JSON. By default its read from stdout console. But if output is required to write into json file, the VTP mandates to take that output file name as one more arguments to the scripts. so following additional changes required in yaml
cmd.command: ... $s{tmp:result.json}
cmd.output: $s{tmp:result.json}
NOTE: additional argument name and output name should match.
In this release, only one tester is supported in edgeT so its recommended to keep all testsuites and test cases under one folder like 'feature1'.
Run below script to build the docker image, it will be build as edgegallery/edget-feature1-testcase , where feature1 will be replaced with actual test name.
build.sh
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。