cucumber-api
cucumber-api copied to clipboard
Default header values
Headers a reset after each request, which makes sense, but in most API calls header values are always the same (like a basic auth header or content type). It would significantly DRY up tests to allow for default headers to get set that bypass the need to say "I send and accept JSON" and other header settings.
I'm going to open a PR for this shortly.
I do this by making use of Background, which is applied to all scenarios in the Feature.
This PR shows an example: https://github.com/hidroh/cucumber-api/pull/26