jfnumainville
2 years agoOccasional Contributor
TestRunListener beforeRun: Get test step auth profile name
I created a "TestRunListener.beforeRun" event in order to refresh an expired OAuth token before a test step is ran using the Groovy script of this support page.
I noticed that the auth profile entry name (Ora Bannet) is hard coded:
def authProfile = project.getAuthRepository().getEntry("Ora Bannet");
Is there a way to dynamically retrieve the auth entry name? This would allow to make my event applicable to all the auth profiles used in my project.
Thank you in advance for your help! 😀