taverntesting / tavern

A command-line tool and Python library and Pytest plugin for automated testing of RESTful APIs, with a simple, concise and flexible YAML-based syntax
https://taverntesting.github.io/
MIT License
1.02k stars 193 forks source link

"Contain" in json response #824

Closed michaldev closed 1 year ago

michaldev commented 1 year ago

Is possible to match only few parameters in returned json? I have big json, and I don't want checking all fields. I would like to check only key elements.

michaelboulton commented 1 year ago

You can use the 'strict' key to control how responses are matched: https://tavern.readthedocs.io/en/latest/basics.html#strict-key-checking