TeamCity¶
Run the TeamCity agent as a logged-in Windows user, not as SYSTEM, so UIA can access the desktop.
Command Line Build Step¶
With Artifacts¶
pip install "dolphin-desktop[video]" pytest
set DOLPHIN_TRACE=on-failure
set DOLPHIN_VIDEO=keepfailedonly
pytest tests/ -v --dolphin-screenshot-on-fail --junitxml=test-results.xml
Artifact paths:
dolphin-traces/** => dolphin-traces.zip
dolphin-videos/** => dolphin-videos.zip
dolphin-screenshots/** => dolphin-screenshots.zip
dolphin-report.html
test-results.xml
Kotlin DSL Sketch¶
.teamcity/settings.kts
import jetbrains.buildServer.configs.kotlin.*
import jetbrains.buildServer.configs.kotlin.buildSteps.script
project {
buildType(DesktopTests)
}
object DesktopTests : BuildType({
name = "Desktop Tests"
steps {
script {
name = "Install and run"
scriptContent = """
pip install dolphin-desktop pytest
dolphin doctor
pytest tests/ -v --dolphin-backend=uia --tb=short
""".trimIndent()
}
}
requirements {
contains("teamcity.agent.jvm.os.name", "Windows")
}
})
Headless Smoke Tests¶
Use hidden-desktop execution only for tests that have been checked against the limitations in Headless Mode.