Package net.serenitybdd.screenplay
Class InParallel
java.lang.Object
net.serenitybdd.screenplay.InParallel
public class InParallel
extends java.lang.Object
Run a series of Performable tasks in parallel with different actors
-
Method Summary
Modifier and Type Method Description void
eachAttemptTo(java.util.Collection<Performable> tasks)
void
eachAttemptTo(Performable... tasks)
Have several actors perform a given task in parallel, for example:void
perform(java.lang.Runnable... tasks)
void
perform(java.lang.String stepName, java.lang.Runnable... tasks)
void
perform(java.util.List<java.lang.Runnable> tasks)
static InParallel
theActors(java.util.Collection<Actor> actors)
static InParallel
theActors(Actor... actors)
Perform the specified tasks in parallel.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
theActors
Perform the specified tasks in parallel. For example:InParallel.theActors(johny, gina, jimmy).perform( () -> johnny.attemptsTo(BookFlight.from("New York).to("London")), () -> gina.attemptsTo(BookFlight.from("New York).to("Los Angeles")), () -> jimmy.attemptsTo(BookFlight.from("Sydney).to("Hong Kong")), );
-
theActors
-
perform
public void perform(java.util.List<java.lang.Runnable> tasks) -
perform
public void perform(java.lang.Runnable... tasks) -
perform
public void perform(java.lang.String stepName, java.lang.Runnable... tasks) -
eachAttemptTo
Have several actors perform a given task in parallel, for example:InParallel.theActors(johny, gina, jimmy).eachAttemptTo(BookFlight.from("New York).to("London"));
-
eachAttemptTo
-