functional-tests/assets/mappings/files.yaml
#dynamic URL mapping used in response body
- request:
url: /stubs/phone-([0-9]+)/file
response:
file: phone.xml
#dynamic file name where somepart of request is used in response data
- request:
url: /stubs/id-([0-9])/name-([a-zA-Z]+)
response:
file: "file{{ url[1] }}.xml"
#DONE
- request:
url: /stubs/not-found
response:
strategy: first-found
files: ["notexist.xml","simple.xml"]
#DONE
- request:
url: /stubs/random
response:
strategy: random
files: ["file1.xml","simple.xml","file3.xml"]
#DONE
- request:
url: /stubs/round-robin
response:
strategy: round-robin
files:
- "file1.xml"
- "notexist.xml"
- "file3.xml"
- request:
url: /stubs/round-robin-first-found
response:
strategy: ["round-robin","first-found"]
files: ["file1.xml","notexist.xml","file3.xml"]
- request:
url: /stubs/random-first-found
response:
strategy: ["random","first-found"]
files: ["file1.xml","notexist.xml","file3.xml"]
#multiple status
- request:
url: /stubs/round-robin-first-found/multi
response:
strategy: ["round-robin","first-found"]
status: 203
files:
- {'status' : 202, 'name': "file1.xml"}
- "notexist.xml"
- "file3.xml"
- request:
url: /stubs/unsupported-strategy
response:
strategy: ["random","round-robin"]
files: ["file1.xml","notexist.xml","file3.xml"]
- request:
url: /stubs/invalid-strategy
response:
strategy: "alternate"
files: ["file1.xml","notexist.xml","file3.xml"]