-
Notifications
You must be signed in to change notification settings - Fork 13
Bucky Test Code Reference
These topics describe of the Test Code file format.
The test code file is a YAML file defining, description, device, service, priority, test_category, label, cases and procedures. The path for test code file is WORKING_DIRECTORY/services/SERVICE_NAME/DEVICE/scenario/TEST_CATEGORY/
Example Test Code file
desc: suite description
device: pc
service: service_name
priority: high
test_category: e2e
labels: test_label_foo
setup_each:
procs:
- proc: login
exec:
operate: go
url: https://example.com/login
teardown_each:
procs:
- proc: login
exec:
operate: go
url: https://example.com/logout
cases:
- case_name: test_code_1
func: inquire button
desc: case description
labels:
- test_label_bar
- test_label_baz
procs:
- proc: open page
exec:
operate: go
url: http://example.com/
- proc: open page
exec:
verfy: assert_title
expect: The test page titleDescription for this test suite.
Note: In Bucky test code, we crate one file as one test suite.
The device type which this test code depends to.
Supports Value: "pc", "sp", "tablet"
Note: Namespace structure for test code. Also be used as a filter in run command's option.
The service name which this test code depends to.
Note: Namespace structure for test code. Also be used as a filter in run command's option.
The priority for this test suite. Also be used as a filter in run command's option.
Supports Value: "high", "middle", "low"
The test category which this test code is.
Supports Value: "e2e", "linkstatus"
Note: Namespace structure for test code. Also be used as a filter in run command's option.
The label for all cases in this suite.
Note: Also be used as a filter in run command's option.
Example:
labels: test_label_foolabels:
- test_label_foo
- test_label_barThere can be multiple cases in one suite. Case level is the smallest level that Bucky can execute.
The name of this case. It should be FILE_NAME + "_" + numbers
Note: It will be shown in the console message when test executing.
Example:
case_name: name_of_file_1The function this case will test.
Example:
func: loginDescription for this case.
Example:
decs: This is the example test for login.The label this cases.
Note: Also be used as a filter in run command's option.
Example:
labels: test_label_foolabels:
- test_label_foo
- test_label_barThere can be multiple procedures in one case.
This procedure's name.
Note: It will be shown in the console message when test executing.
There are some execution in this procedure.