How do I run a Windows desktop test from CI?
Start the run from your pipeline. The connected Windows agent operates the application in an unlocked desktop session and reports the result.
For example, have CI run a saved invoice test that opens the native application, saves an invoice and reopens the record to verify its reference. Publish the JUnit result with the pipeline.
How do I prepare a Windows test agent?
Watch the test run walkthroughWhere to view results
The best place to view detailed test results, step-by-step execution, and historical trends is in the QATE AI dashboard. The JUnit XML report provides a summary of pass/fail results directly in your CI platform's build view, so your team can quickly see if tests passed without leaving the pipeline.
GitHub Actions
name: Run Windows Desktop Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install QATE AI CLI
run: npm install -g @qate/cli
- name: Run Windows Desktop Tests
run: qate run -n "Windows App Regression" --junit results/junit.xml
env:
QATE_API_KEY: ${{ secrets.QATE_API_KEY }}
- name: Publish Test Results
uses: mikepenz/action-junit-report@v4
if: always()
with:
report_paths: results/junit.xmlRunning a Test Sequence (Sequential)
- name: Run User Flow Sequence
run: qate run:sequence -n "User Registration Flow" --junit results/junit.xml
env:
QATE_API_KEY: ${{ secrets.QATE_API_KEY }}Jenkins Pipeline
pipeline {
agent any
environment {
QATE_API_KEY = credentials('qate-api-key')
}
stages {
stage('Run Windows Tests') {
steps {
sh 'npm install -g @qate/cli'
sh 'qate run -n "Windows App Regression" --junit results/junit.xml'
}
}
}
post {
always {
junit 'results/junit.xml'
}
}
}GitLab CI
stages:
- test
windows_tests:
stage: test
image: node:20
script:
- npm install -g @qate/cli
- qate run -n "Windows App Regression" --junit results/junit.xml
variables:
QATE_API_KEY: $QATE_API_KEY
artifacts:
when: always
reports:
junit: results/junit.xmlAzure DevOps
trigger:
- main
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
inputs:
versionSpec: '20.x'
- script: npm install -g @qate/cli
displayName: 'Install QATE AI CLI'
- script: qate run -n "Windows App Regression" --junit results/junit.xml
displayName: 'Run Windows Desktop Tests'
env:
QATE_API_KEY: $(qate-api-key)
- task: PublishTestResults@2
condition: always()
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: 'results/junit.xml'
testRunTitle: 'QATE Windows Tests'Smart Run (PR Pipeline)
Use --smart to run only the desktop tests affected by a pull request. The CLI analyzes the PR diff with AI, selects impacted tests, and triggers remote execution on connected Windows agents.
name: QATE AI Smart Desktop Tests
on:
pull_request:
branches: [main, develop]
jobs:
smart-desktop-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install QATE AI CLI
run: npm install -g @qate/cli
- name: Run AI-Selected Desktop Tests
run: qate run --smart --app ${{ vars.QATE_APP_ID }} --junit results/junit.xml
env:
QATE_API_KEY: ${{ secrets.QATE_API_KEY }}
- name: Publish Test Results
uses: mikepenz/action-junit-report@v4
if: always()
with:
report_paths: results/junit.xmlBest Practices
- Store API keys as secure secrets in your CI platform
- Set appropriate timeouts based on your test suite execution time — use
--timeoutto override the default (600s) - The CLI automatically triggers execution on the connected Windows agent and polls until complete
- Use
--junitto generate JUnit XML reports for native test result integration - Consider running Windows tests in parallel with other pipeline stages
- Use different test sets for PR checks (smoke tests) vs. main branch (full regression)