Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions docs-site/docs/ci/jenkins.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,21 @@ stage('Test') {
parallel {
stage('Chrome') {
steps {
sh 'mvn test -B -Dbrowser.type=chrome'
sh 'mvn test -B -Dselenium.boot.profile=chrome'
}
}
stage('Firefox') {
steps {
sh 'mvn test -B -Dbrowser.type=firefox'
sh 'mvn test -B -Dselenium.boot.profile=firefox'
}
}
}
}
```

Each profile is a small override file next to `selenium-boot.yml`, for example `selenium-boot-firefox.yml` that sets `name: firefox` under `browser:`. See [environment profiles](../configuration#environment-profiles).


---

## Environment variables
Expand Down
20 changes: 10 additions & 10 deletions docs-site/docs/gradle.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ test {
// suites 'src/test/resources/testng.xml'
}

// Forward -Denv=staging / -Dbrowser=firefox from the CLI. Forward only the keys you use:
// Forward -Denv=staging from the CLI. Forward only the keys you use:
// copying every JVM property (java.home, ...) breaks the run if the test JVM differs from Gradle's
['browser', 'env'].each { k -> System.getProperty(k)?.with { systemProperty k, it } }
['env'].each { k -> System.getProperty(k)?.with { systemProperty k, it } }

// Display test output in the console
testLogging {
Expand All @@ -91,9 +91,9 @@ tasks.test {
// suites("src/test/resources/testng.xml")
}

// Forward -Denv=staging / -Dbrowser=firefox from the CLI. Forward only the keys you use:
// Forward -Denv=staging from the CLI. Forward only the keys you use:
// copying every JVM property (java.home, ...) breaks the run if the test JVM differs from Gradle's
listOf("browser", "env").forEach { k -> System.getProperty(k)?.let { systemProperty(k, it) } }
listOf("env").forEach { k -> System.getProperty(k)?.let { systemProperty(k, it) } }

testLogging {
events("passed", "skipped", "failed")
Expand Down Expand Up @@ -121,7 +121,7 @@ dependencies {

test {
useJUnitPlatform()
['browser', 'env'].each { k -> System.getProperty(k)?.with { systemProperty k, it } }
['env'].each { k -> System.getProperty(k)?.with { systemProperty k, it } }
}
```

Expand All @@ -137,7 +137,7 @@ dependencies {

tasks.test {
useJUnitPlatform()
listOf("browser", "env").forEach { k -> System.getProperty(k)?.let { systemProperty(k, it) } }
listOf("env").forEach { k -> System.getProperty(k)?.let { systemProperty(k, it) } }
}
```

Expand Down Expand Up @@ -184,7 +184,7 @@ retry:
./gradlew test -Denv=staging

# Pass multiple JVM args
./gradlew test -Dbrowser.name=firefox -Dbrowser.headless=true
./gradlew test -Dselenium.boot.profile=firefox # reads selenium-boot-firefox.yml
```

---
Expand Down Expand Up @@ -215,7 +215,7 @@ For parallel runs with Gradle, configure the `test` task alongside `selenium-boo
test {
useTestNG()
maxParallelForks = 4 // Gradle worker processes
['browser', 'env'].each { k -> System.getProperty(k)?.with { systemProperty k, it } }
['env'].each { k -> System.getProperty(k)?.with { systemProperty k, it } }
}
```

Expand All @@ -226,7 +226,7 @@ test {
tasks.test {
useTestNG()
maxParallelForks = 4
listOf("browser", "env").forEach { k -> System.getProperty(k)?.let { systemProperty(k, it) } }
listOf("env").forEach { k -> System.getProperty(k)?.let { systemProperty(k, it) } }
}
```

Expand Down Expand Up @@ -283,7 +283,7 @@ dependencies {

test {
useTestNG()
['browser', 'env'].each { k -> System.getProperty(k)?.with { systemProperty k, it } }
['env'].each { k -> System.getProperty(k)?.with { systemProperty k, it } }
testLogging { events 'passed', 'skipped', 'failed' }
}
```
Expand Down
Loading