Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- object ScenarioHelpers {
- val identifierList = (1 to Scenarios.numberOfScenarios).toArray
- val concurrentIdentifierQueue = new ConcurrentLinkedQueue[Int](identifierList.toSeq)
- }
- abstract class AbstractScenario {
- val identifier = ScenarioHelpers.concurrentIdentifierQueue.poll()
- }
- object Test1 extends AbstractScenario {
- val scenario1 = scenario("test scenario 1").exec(/..steps../)
- }
- object Test2 extends AbstractScenario {
- val scenario2 = scenario("test scenario 2").exec(/..steps../)
- }
- object Scenarios {
- val scenarios = List(Test1.scenario1, Test2.scenario2)
- val numberOfScenarios = scenarios.length
- }
- object TestPreparation {
- val feeder = ScenarioHelpers.identifierList.map(n => Map("counter" -> n))
- val prepScenario = scenario("test preparation")
- .feed(feeder)
- .exec(/..steps../)
- }
Add Comment
Please, Sign In to add comment