svanoort / pyresttest

Python Rest Testing
Apache License 2.0
1.15k stars 325 forks source link

How can i use values of one yaml file in second yaml file using import? #250

Open mravitej opened 7 years ago

mravitej commented 7 years ago

I need to give all my parameters in one file i.e variables.yaml and I need to use values of variable.yaml in test_cases.yaml

for example:

variables.yaml

- config:
   - testset: "Test cases using test app"
   - variable_binds: { username: 'ravitej',
password: '123456789'}

test_cases.yaml

- test: # Tenant_User: User Login without portal_name
   - name: "Tenant_User: User Login without portal_name"
   - url: "/user/login"
   - method: "POST"
   - body: {template: {"username": "$username", "password": "$password", "authtype": "plain"}}
   - headers: {Content-Type: application/json}
   - expected_status: [200]

how can I import variables.yaml file in test_cases.yaml?

mvitiuk commented 7 years ago

@mravitej you can not now, look into #256