case class JourneyPart(id: String, description: String) extends Product with Serializable
Used to constructs parts of a Journey as listed in journeys.conf. The JourneyPart is defined within a performance test using uk.gov.hmrc.performance.simulation.JourneySetup.setup.
To create a JourneyPart with uk.gov.hmrc.performance.simulation.JourneySetup.setup:
setup("login", "Login") withRequests (navigateToLoginPage, submitLogin)
- id
A unique id which should match the parts listed in journeys.conf
- description
Description of the journey part surfaced in the gatling report.
- Alphabetic
- By Inheritance
- JourneyPart
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new JourneyPart(id: String, description: String)
- id
A unique id which should match the parts listed in journeys.conf
- description
Description of the journey part surfaced in the gatling report.
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val ab: ListBuffer[ActionBuilder]
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def builder: ChainBuilder
Used internally by uk.gov.hmrc.performance.simulation.JourneySetup.journeys to chain the requests and actions included in the JourneyPart.
Used internally by uk.gov.hmrc.performance.simulation.JourneySetup.journeys to chain the requests and actions included in the JourneyPart.
Applies conditionallyRun when a condition is specified in JourneyPart using toRunIf.
- returns
Requests and Actions of the JourneyPart as a
ChainBuilder
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- var conditionallyRun: (ChainBuilder) => ChainBuilder
- val description: String
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val id: String
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toRunIf(sessionKey: Expression[String], value: String): JourneyPart
Checks whether to run a setup step depending on whether the actual sessionKey value matches the expected value.
Checks whether to run a setup step depending on whether the actual sessionKey value matches the expected value. The expected value can also be a Gatling sessionKey as the underlying doIfEquals method implicitly converts it into an Expression[Any].
- sessionKey
the sessionKey to obtain the actual value.
- value
the expected value to compare.
- returns
JourneyPart
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def withActions(actions: ActionBuilder*): JourneyPart
Chains ActionBuilders to a setup.
Chains ActionBuilders to a setup. ActionBuilder is what is passed to the DSL
exec()method.For example, to add a PauseBuilder to a setup
val pause = new PauseBuilder(10 milliseconds, None) setup("pause-action", "pauses for 10 milliseconds") withActions(pause)
Since, HttpRequestBuilder is also an ActionBuilder, these can be chained together.
In the below example
navigateToLoginPageandsubmitLoginare of typeHttpRequestBuilderval pause = new PauseBuilder(1 milliseconds, None) setup("login", "Login") withActions(navigateToLoginPage, pause, submitLogin)
To include a ChainBuilder, use
.actionBuildersto covert it into aList[ActionBuilder]and pass it to withActions as below.In the below example,
sessionSetupis of typeList[ActionBuilder]setup("session-setup", "Setting Session Value") withActions(sessionSetup:_*)
- actions
of type
ActionBuilder- returns
JourneyPart for chaining additional requests, actions, and conditional runs
- def withRequests(requests: HttpRequestBuilder*): JourneyPart
Chains HttpRequestBuilder to uk.gov.hmrc.performance.simulation.JourneySetup.setup.
Chains HttpRequestBuilder to uk.gov.hmrc.performance.simulation.JourneySetup.setup.
setup("login-page", "Navigate to login page") withRequests navigateToLoginPage
- requests
of type
HttpRequestBuilder- returns
JourneyPart for chaining additional requests, actions, and conditional runs