executeParallel
Executes the provided test block concurrently across each active target driver in parallel.
Inside block, this refers to a target-scoped E2ETestScope connected directly to an individual target driver (such as Desktop, Wasm, Android, or iOS). Actions dispatched within block run independently on each target without waiting for other target viewports to reach the same step.
When to Use
Use executeParallel when writing navigation or layout helpers for multi-target scenarios where different target viewports display different UI states (for example, a wide Desktop window displaying a persistent navigation rail vs a mobile screen displaying a compact hamburger button and modal drawer).
When to Avoid
Avoid using executeParallel inside standard end-to-end test scenarios. Standard test flows should use the top-level unified DSL (click, input, assertVisible), which enforces a strict step-barrier contract across all target platforms after every command.
Example Usage
@OptIn(InternalParikshanApi::class)
suspend fun E2ETestScope.openAppNavigation() {
executeParallel {
if (hasVisibleNode("hamburger_button")) {
if (!hasVisibleNode("navigation_drawer")) {
click("hamburger_button")
waitFor("navigation_drawer")
}
}
}
}Parameters
The target-scoped test operations to execute independently on each active target.