Forum Discussion

srixon's avatar
srixon
Occasional Contributor
3 years ago
Solved

How to handle when there is a separate Basic Auth endpoint and api endpoint for each environment

How to handle when there is a separate Basic Auth endpoint that returns a JWT and api endpoint for each environment   Here is the use case: 1.  There are multiple environments and each environment...
  • KarelHusa's avatar
    3 years ago

    srixon ,

    given the details you gave us above I would suggest the following solution:

    • Set your tenant as the project level property, e.g. tenant
    • Define environment specific stuff within Environment configuration
      • Define two APIs:
        • one for authorization API
        • second for your target API
      • In the endpoints use project-level tenant property (e.g. ${#Project#tenant}) to parametrize the endpoints
      • Grab the token from the authorization response and save it to another project-level property

    When executing the testrunner, use parameters:

    -E to set the environment

    -P to set the tenant (project level variable)

     

    Best regards,

    Karel