refactor parameterization:

parameter value now can be in three types:
(1) data list
(2) call built-in parameterize function
(3) call custom function in debugtalk.py
This commit is contained in:
httprunner
2018-03-07 16:21:51 +08:00
parent b191197a43
commit 96fc410234
8 changed files with 124 additions and 51 deletions
+4 -4
View File
@@ -1,13 +1,13 @@
- config:
name: "user management testset."
parameters:
- user_agent: Random
- app_version: Sequential
- user_agent: ["iOS/10.1", "iOS/10.2", "iOS/10.3"]
- app_version: ${gen_app_version()}
- username: ${parameterize(account.csv)}
variables:
- user_agent: 'iOS/10.3'
- device_sn: ${gen_random_string(15)}
- os_platform: 'ios'
- app_version: '2.8.6'
request:
base_url: $BASE_URL
headers:
@@ -17,7 +17,7 @@
- token
- test:
name: get token with $user_agent and $app_version
name: get token with $user_agent and $app_version, username $username
api: get_token($user_agent, $device_sn, $os_platform, $app_version)
extract:
- token: content.token