I've noticed that when KRE is running as a service in Azure, Katalon executions do not appear. However, when running interactively, the test executions are visible in the browser

Hi,

I’ve noticed that when KRE is running as a service in Azure, Katalon test executions do not appear on the screen. However, when running interactively, the test executions are visible in the browser. Not sure it is common issue. Please clarify. Thanks

1 Like

Now let me fetch the complete KRE documentation to get more details on service mode execution:## Answer: KRE Running as Service in Azure - Browser Visibility Issue

Based on the official Katalon documentation and your observation, here’s the clarification on this common issue:


Problem Analysis

You’re experiencing a situation where:

  • :white_check_mark: Interactive mode: Test executions are visible in the browser
  • :cross_mark: Service mode (Azure): Test executions do NOT appear on the screen

This is NOT a bug — it’s expected behavior for Windows/Azure services.


Root Cause: Session Isolation in Windows Services

When KRE runs as a Windows Service (including in Azure VMs), it operates in a different session context than the interactive user session. According to Windows service architecture:

Key Points:

  1. Service sessions are isolated - Windows services run in Session 0 (system session)
  2. User sessions are separate - Interactive users run in Session 1, 2, 3, etc. (user sessions)
  3. No desktop interaction - Services cannot directly interact with the user’s desktop/display
  4. No browser window rendering - GUI applications running in service context cannot display windows to the user

This is a security and stability feature of Windows, not a Katalon limitation.


Why This Happens

Execution Mode Session Context Browser Visibility Use Case
Interactive (Manual) User Session (1, 2, 3…) :white_check_mark: Visible on screen Local testing, debugging
Service Mode System Session (0) :cross_mark: Not visible Automated CI/CD, scheduled tasks, Azure VMs
Console Mode (CLI) User Session :white_check_mark: Visible (if run from CLI) Scheduled tasks, CI/CD pipelines

How KRE Works in Service Mode

According to the KRE documentation:

  1. KRE runs in console mode (-runMode=console)
  2. No GUI is rendered - The browser runs in headless or background mode
  3. Tests still execute - All test logic runs normally
  4. Results are captured - Screenshots, logs, and reports are generated
  5. Output is written to disk - Reports are saved to the file system

The tests ARE running successfully — you just can’t see them on the screen.


How to Verify Tests Are Running in Service Mode

Even though you can’t see the browser, you can verify execution:

1. Check the Console Log

<KRE_Installation>/Reports/console0.log

2. Check Test Reports

<KRE_Installation>/Reports/<timestamp>/index.html

3. Check TestOps Integration

  • If configured, test results are uploaded to Katalon TestOps
  • View results in the TestOps dashboard

4. Monitor Process

# PowerShell - Check if KRE process is running
Get-Process | findstr katalonc

Solution: Configure KRE for Service Execution

If you want to run KRE as a service in Azure, follow these best practices:

Step 1: Use Headless Browser Mode

Add this to your KRE command or console.properties:

# For Chrome headless
-browserType="Chrome (headless)"

# Or add to desired capabilities
--config -webui.chrome.args="--headless=new"

Step 2: Ensure Proper File Permissions

When running as a service, ensure the service account has permissions to:

  • Read the project files
  • Write to the Reports folder
  • Access network resources (if needed)

Step 3: Use Absolute Paths

Always use absolute paths in your KRE command:

katalonc -noSplash -runMode=console \
  -projectPath="C:\absolute\path\to\project\test.prj" \
  -testSuiteCollectionPath="Test Suites/MyTestSuite" \
  -browserType="Chrome (headless)" \
  -apiKey="<your_api_key>"

Step 4: Configure Azure VM Service

If running as an Azure VM service, use Task Scheduler or Azure Automation:

# Example: Create scheduled task in Azure VM
$action = New-ScheduledTaskAction -Execute "C:\KRE\katalonc.exe" `
  -Argument "-noSplash -runMode=console -projectPath=C:\project\test.prj"

Register-ScheduledTask -TaskName "KatalonTests" -Action $action -Trigger $trigger

Is This Common?

Yes, this is completely normal and expected. Most CI/CD systems (Jenkins, GitHub Actions, Azure DevOps) run tests in service/headless mode where the browser is not visible. The important thing is that:

  • :white_check_mark: Tests execute successfully
  • :white_check_mark: Results are captured and reported
  • :white_check_mark: Logs and screenshots are saved
  • :white_check_mark: TestOps integration works

References


Bottom Line: This is not a bug or issue — it’s the expected behavior of Windows services. Your tests are running correctly; you just can’t see the browser window because services run in an isolated session. Monitor execution through logs, reports, and TestOps integration instead.