Pass Katalon TestOps email and password as environment variables instead of hard coding in Project Settings?

Hi there,

I’m currently integrating my Katalon Studio project with Katalon TestOps, and I noticed that in the Project Settings → Katalon Platform section, the configuration requires entering an Email and Password for authentication.

I’d like to avoid storing credentials directly in the project file and instead pass them as environment variables (for example, through Global variables/GitHub Actions secrets).

Is there a way to configure Katalon Studio to read the TestOps credentials — Email and Password — from environment variables or external configuration instead of hardcoding them in the project settings?

2 Likes

hi @praveen.subramani
if you want to pass the credentials thru ENV var, you can do it like this (using API key instead):

katalonc
-noSplash
-runMode=console
-projectPath="C:\Users\username\Desktop\Katalon Studio\MyProject\MyProject.prj"
-testSuitePath="Test Suites/MyTestSuite"
-browserType="Chrome"
-executionProfile="default"
-apiKey="YOUR_API_KEY"
1 Like

Hi @depapp, as shown in the attached image, I’ve used the email testUser@gmail.com. I’d like to store and pass this email and its corresponding password using environment variables like globalVariable or some form of global configuration.

Global Variables (Not for TestOps Auth)

  • Katalon’s GlobalVariable system is intended for test data and parameters, not core system authentication—there is no built-in way to map a global variable to the TestOps authentication fields in project settings.

Recommended: Use TestOps API Key Instead

  • When running tests from the CLI (katalonc command), you can pass the -apiKey="YOUR_API_KEY" option instead of Email/Password.
  • This is best practice for automation and CI/CD, since API keys can be securely managed as environment variables or CI secrets (e.g. in GitHub Actions, Jenkins, Azure DevOps).​
  • Example for console execution:
katalonc \
  -noSplash \
  -runMode=console \
  -projectPath="C:\Users\username\MyProject.prj" \
  -testSuitePath="Test Suites/MySuite" \
  -browserType="Chrome" \
  -apiKey="$KATALON_API_KEY"

Store your API key in an environment variable or secret provider and reference it, ensuring you avoid hardcoding sensitive credentials.

@dineshh
yes, I’ve used exactly what you’ve mentioned

but getting this below error

My question is, if we haven’t configured the integration within Katalon Studio (UI), how will the test results be uploaded to TestOps during CI/CD execution using only the API key, since we haven’t specified the organization ID or project ID anywhere?

hi @praveen.subramani
if your goal is to add the specific organization ID / project ID, you can pass these 2 params on your command line:

-orgID=<your_org_id>
-testOpsProjectId=<your_project_id> 

reference: Command-line syntax in Katalon Runtime Engine | Katalon Docs

1 Like