Forum Discussion

bpistole's avatar
bpistole
Contributor
7 years ago

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 an...
  • Radford's avatar
    7 years ago

    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.