Skip to content

How can I include the base URI and custom headers in the API test cases using tcases #191

Discussion options

You must be logged in to vote

For the base URI, Tcases uses the first element of the servers property defined by the OpenAPI document. Your example shows what happens when servers is missing or empty. Although, when defined, you'll see this server URI included in the request URL, not in the baseUri setting.

It's reasonable to expect that the servers array could list different URIs for different test environments. In which case, it would be helpful to have a way to select the one to use for the generated test, using a parameter specified at runtime. Unfortunately, there's no well-defined identifier associated with a Server object. One solution might be a parameter that specifies a regex to match the server.description.…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@soumyadipmitralpl
Comment options

Answer selected by kerrykimbrough
Comment options

You must be logged in to vote
2 replies
@soumyadipmitralpl
Comment options

@kerrykimbrough
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants