bpistole
7 years agoContributor
How to Select Auth method during run time
I've got a project that needs to run in several different Azure environments. Each one has it's own authorization profile. I need to be able to set this value based on the test environment. Has anyone dealt with this
Conversly I could also possible populate the auth profile values based on the env. I could just store the tenant, secret, resource values and create the profile at run time. I'm not sure if this is even feasible but just trying to think of options.
Thanks,
Billy
I have very rarely had to dynamically change the auth profile. This can be achived by the following Groovy Script:
testRunner.getTestCase().getTestStepByName('SOAP Request').setAuthProfile('Profile Name')
Any test step that implements the AuthProfileHolderContainer interface should be able to use the above script.