custom authorization in groovy script .need explanation for each in body section?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2021
01:28 AM
02-09-2021
01:28 AM
custom authorization in groovy script .need explanation for each in body section?
def authProfileName = "Name of your profile";
def project = testRunner.getTestCase().getTestSuite().getProject();
def authProfile = project.getAuthRepository().getEntry(authProfileName);
authProfile.setUsername("newUsername");
authProfile.setPassword("newPassword");
authProfile.setDomain("newDomain");
//Set to true for pre-emptive authentication
//Set to false for using global preference
authProfile.setPreemptive(true);
def step = testRunner.testCase.getTestStepByName("Name of your request").getHttpRequest();
step.setSelectedAuthProfile(authProfileName);
@nmrao @rupert_anderson top contributors please help
Labels:
- Labels:
-
REST
2 REPLIES 2
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2021
11:39 AM
02-09-2021
11:39 AM
Hey @Arunachalam_RM,
Can you confirm exactly what youre trying to do an what the problem is?
Ta
Rich
Can you confirm exactly what youre trying to do an what the problem is?
Ta
Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2021
02:34 AM
02-10-2021
02:34 AM
I am just trying to know how custom authorization is going to work in groovy
