Hi
I have tried to implement a process running scenarios in sequence using the method described in :https://stackoverflow.com/questions/15568284/modularising-scenarios-to-run-in-sequence-using-gatling
We have a number of scenarios that will be running in parallel, but there are a few that will need to be run in sequence, i.e scn1, then scn2 then scn3
ive tried this
package CommPayPerfTest
import CommPayPerfTest.Configuration._
import CommPayPerfTest.Components.Common._
import CommPayPerfTest.Scenarios._
import CommPayPerfTest.Scenarios.CommPay.PerfTestApi._
import io.gatling.core.structure.{ChainBuilder, ScenarioBuilder}
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import scala.concurrent.duration._
// Use this for developing a scenario in isolation
class StatementSimulation extends Simulation {
val httpProtocol = Config.getHttpProtocol(http)
val statementRecords = exec(StatementRecord)
val statementImport = exec(StatementImport)
val modular = Seq (statementRecords,statementImport)
val scn1 = scenario (“Scenario 1”).exec(modular)
setUp(
scn1.getScenario()
.inject(atOnceUsers(1))
//scn1.getScenario()
// .inject(atOnceUsers(1))
)
.protocols(httpProtocol)
}
but it fails with this error:
12:13:14.968 [ERROR] i.g.c.ZincCompiler$ - C:\Gatling\Commpay-PerformanceTesting\user-files\simulations\CommPayPerfTest\Scenarios\CommPay\PerfTestApi\StatementScenarios.scala:20:28: overloaded method value exec with alternatives:
(scenario: io.gatling.core.structure.ScenarioBuilder)io.gatling.core.structure.ChainBuilder
(chains: Iterable[io.gatling.core.structure.ChainBuilder])io.gatling.core.structure.ChainBuilder
(chains: Iterator[io.gatling.core.structure.ChainBuilder])io.gatling.core.structure.ChainBuilder
(chains: io.gatling.core.structure.ChainBuilder*)io.gatling.core.structure.ChainBuilder
(actionBuilder: io.gatling.core.action.builder.ActionBuilder)io.gatling.core.structure.ChainBuilder
(sessionFunction: io.gatling.core.session.Expression[io.gatling.core.session.Session])io.gatling.core.structure.ChainBuilder
cannot be applied to (CommPayPerfTest.Scenarios.CommPay.PerfTestApi.StatementRecord.type)
val statementRecords = exec(StatementRecord)
any ideas i thought this would be straightforward…)
^
Shazad Dad
Senior Tester
Tel: +441926621417
1 Kingmaker Court, Warwick Technology Park, Gallows Hill,
Warwick, Warwickshire, CV34 6DY
The contents of this email originated from Iress. For this purpose Iress includes Iress Limited and/or any of its subsidiaries, holding companies and trading entities.
If you have received this email in error please notify the sender immediately and delete this email.
nosig