Forum Discussion
Lokesh777
Occasional Contributor
Hi TanyaYatskovska ,
We are using Java Script as "Script Language" for our Rest Project.
In one of our tests, I need to retrieve the Authorization which has been set for the project currently.
So ,I need to retrieve the "Profile name" from Auth Manager which has been set in a script assertion.
I am expecting a possible soultion for this.
Thanks in advance :)
NBorovykh
6 years agoModerator
Hi Lokesh777,
This JavaScript code retrieves the auth method set for your project in the current environment and posts its name to the log:
var auth = context.testCase.testSuite.project.getAuthProfileHolder().getAuthProfile(); log.info(auth);
A video showing how it works for me is attached.
I hope this is what you were looking for.
Related Content
- 31 days ago
- 5 years ago
- 2 months ago
- 4 years ago
Recent Discussions
- 5 days ago
- 10 days ago