Pass Jenkins Credentials to Web Request Object

I have a web request object that authenticates the user credentials to receive a token. I am trying to avoid manually entering the credentials into the web request object. I would like to pass in the credentials stored in Jenkins to the web request object in my test script. Is this possible?

Hi @andrew_parra,
You have to manually entering the credentials into the request object.

Is it possible then to pass the jenkins credentials to katalon, save them as a local variable in the script and pass them to the web request object like below? If so, what’s the proper command to grab binded jenkins variables?

Hi @andrew_parra,
For your use case, you can define global variables to store your credentials and use them in your test script. To pass your global variable values from command line, you can refer to https://docs.katalon.com/katalon-studio/docs/console-mode-execution.html#katalon-command-line-options for how to override global variables.

This is how I’m setting the environment variables in jenkins for the credentials. I attempted to override the global variables first with “-gUser=$user -gPass=$pass” (since the script is running on a linux slave) which resulted in both global variables being empty. Then I ran it as in the screenshot, which also resulted in both global variables being empty.

Hi @andrew_parra,
Please try “-g_User=$user -g_Pass=$pass”