Headless & Continuous Integration

Headless Mode


A very common use case is to execute tests in Continuous Integration systems (build pipelines) in headless mode.

Config changes to execute tests in headless mode

  1. Create a new config called ci.properties and

    a. Specify web.headless as true

  2. Execute tests via gradle task

    a. /gradlew clean runWebTests -Dconfig=ci

ci.properties

# Web Config

# Target Browser. Supported values <any | chrome | firefox | msedge |responsive>
web.target: chrome

# Feed file having desiredCapabilities, arguments etc
web.headless: true

Use ci.properties config while running tests

./gradlew clean runWebTests -Dconfig=ci