Packages

t

uk.gov.hmrc.performance.simulation

PerformanceTestRunner

trait PerformanceTestRunner extends Simulation with HttpConfiguration with JourneySetup

Trait extending io.gatling.core.scenario.Simulation. Use within a performance test to set up Journeys and invoke runSimulation(), a method to configure the Simulation setup.

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PerformanceTestRunner
  2. JourneySetup
  3. PerftestConfiguration
  4. JourneyConfiguration
  5. HttpConfiguration
  6. Configuration
  7. Simulation
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. class SetUp extends AnyRef
    Definition Classes
    Simulation

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def after(step: => Unit): Unit
    Definition Classes
    Simulation
  5. val allJourneys: List[String]
    Definition Classes
    JourneyConfiguration
  6. lazy val applicationConfig: Config
    Definition Classes
    Configuration
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def before(step: => Unit): Unit
    Definition Classes
    Simulation
  9. def checkJourneyName(id: String): Any
    Definition Classes
    JourneyConfiguration
  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  11. lazy val constantRateTime: FiniteDuration
    Definition Classes
    PerftestConfiguration
  12. def definitions(labels: Set[String] = Set.empty): Seq[JourneyDefinition]

    Maps the journeys defined in journeys.conf to a Seq of uk.gov.hmrc.performance.conf.JourneyDefinition and returns the journeys to be executed based on the provided labels.

    Maps the journeys defined in journeys.conf to a Seq of uk.gov.hmrc.performance.conf.JourneyDefinition and returns the journeys to be executed based on the provided labels. The labels field is defined in application.conf.

    labels

    An optional parameter with a Set of labels for which the journeys should be executed.

    returns

    Seq of JourneyDefinition to be executed for the provided labels.

    Definition Classes
    JourneyConfiguration
  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  15. def generateDescription(journeyDescription: String, runIf: Set[String], skipIf: Set[String]): String

    Generates a new description for a journey based on the description, run-if, and skip-if fields in journeys.conf

    Generates a new description for a journey based on the description, run-if, and skip-if fields in journeys.conf

    Example:

    For the below example journey in journey.conf:

    hello-world-4 = {
      description = "Hello world journey 4"
      load = 0.1
      feeder = data/helloworld.csv
      parts = [
        home
      ]
      run-if = ["label-B"]
      skip-if = ["label-A", "label-C"]
    }

    the generated description would be:

    Hello world journey 4 - runIf [label-B] and skipIf [label-A,label-C]

    journeyDescription

    Value from the description field of a journey in journeys.conf

    runIf

    Labels included in run-if field of a journey in journeys.conf

    skipIf

    Labels included in skip-if field of a journey in journeys.conf

    returns

    A new description based on the description and the labels

    Definition Classes
    JourneyConfiguration
  16. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. def hasProperty(property: String): Boolean
    Definition Classes
    Configuration
  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. val httpProtocol: HttpProtocolBuilder

    Provides a HttpProtocolBuilder with preset configuration.

    Provides a HttpProtocolBuilder with preset configuration. This configures the HTTP protocol used in Gatling simulation.

    https://gatling.io/docs/3.4/http/http_protocol/

    Configurations to note:

    True-Client-IP: Set to java.util.Random() value injected in the Gatling session during JourneySetup.journeys. This value can be used to trace requests injected through the performance-test-runner library.

    disableFollowRedirect: Disables Gatling from following redirect automatically.This means the users of the library should make explicit redirect requests. https://gatling.io/docs/3.4/http/http_protocol/#response-handling-parameters

    Users of the library can override this default configuration by overriding val httpProtocol when extending PerformanceTestRunner trait.

    Definition Classes
    HttpConfiguration
  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. def journeys: Seq[Journey]

    Builds uk.gov.hmrc.performance.simulation.Journey for each journey defined in journeys.conf

    Builds uk.gov.hmrc.performance.simulation.Journey for each journey defined in journeys.conf

    returns

    a Seq of uk.gov.hmrc.performance.simulation.Journey for all the journeys defined in journeys.conf

    Attributes
    protected
    Definition Classes
    JourneySetup
  22. val journeysAvailable: List[String]
    Definition Classes
    JourneyConfiguration
  23. def keys(property: String): List[String]
    Definition Classes
    Configuration
  24. lazy val labels: Set[String]
    Definition Classes
    PerftestConfiguration
  25. lazy val loadFactor: Double
    Definition Classes
    PerftestConfiguration
  26. lazy val loadPercentage: Int
    Definition Classes
    PerftestConfiguration
  27. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. val noLoad: Double
    Definition Classes
    PerftestConfiguration
  29. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  30. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  31. lazy val percentageFailureThreshold: Int
    Definition Classes
    PerftestConfiguration
  32. lazy val rampDownTime: FiniteDuration
    Definition Classes
    PerftestConfiguration
  33. lazy val rampUpTime: FiniteDuration
    Definition Classes
    PerftestConfiguration
  34. def readProperty(property: String, default: String): String
    Definition Classes
    Configuration
  35. def readProperty(property: String): String
    Definition Classes
    Configuration
  36. def readPropertyBooleanOption(property: String): Option[Boolean]
    Definition Classes
    Configuration
  37. def readPropertyList(property: String): List[String]
    Definition Classes
    Configuration
  38. def readPropertyOption(property: String): Option[String]
    Definition Classes
    Configuration
  39. def readPropertySet(property: String): Set[String]
    Definition Classes
    Configuration
  40. def readPropertySetOrEmpty(property: String): Set[String]
    Definition Classes
    Configuration
  41. lazy val requestPercentageFailureThreshold: Int
    Definition Classes
    PerftestConfiguration
  42. lazy val runLocal: Boolean
    Definition Classes
    Configuration
  43. def runSimulation(): Unit

    Configures io.gatling.core.scenario.Simulation.setUp.

    Configures io.gatling.core.scenario.Simulation.setUp. This method is invoked from within a performance test.

    For smoke tests i.e when uk.gov.hmrc.performance.conf.PerftestConfiguration.runSingleUserJourney is true, the setUp is configured to run only for 1 user.

    For a full test, the setUp is configured with:

    • Journeys and the load to run
    • Duration of the run
    • Protocol configuration and
    • Assertions
  44. lazy val runSingleUserJourney: Boolean
    Definition Classes
    PerftestConfiguration
  45. def setUp(populationBuilders: List[PopulationBuilder]): SetUp
    Definition Classes
    Simulation
  46. def setUp(populationBuilders: PopulationBuilder*): SetUp
    Definition Classes
    Simulation
  47. def setup(id: String, description: String): JourneyPart

    Creates JourneyPart which allows to chain HttpRequestBuilder and ActionBuilder.

    Creates JourneyPart which allows to chain HttpRequestBuilder and ActionBuilder.

    id

    Unique identifier for the setup. This should match an entry in the parts provided in journeys.conf

    description

    description of the setup. This value is used in Gatling's scenario description which is surfaced in gatling report.

    returns

    JourneyPart

    Definition Classes
    JourneySetup
  48. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  49. def toString(): String
    Definition Classes
    AnyRef → Any
  50. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  51. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  52. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  53. def withInjectedLoad(journeys: Seq[Journey]): Seq[PopulationBuilder]

    Calculates the load for the provided journeys and constructs the injection steps using Gatling's open injection model: https://gatling.io/docs/current/general/simulation_setup/#open-model.

    Calculates the load for the provided journeys and constructs the injection steps using Gatling's open injection model: https://gatling.io/docs/current/general/simulation_setup/#open-model.

    journeys

    Seq of journeys as defined in journeys.conf

    returns

    Sequence of PopulationBuilder with calculated injection step injected into io.gatling.core.structure.ScenarioBuilder

    Attributes
    protected
    Definition Classes
    JourneySetup

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from JourneySetup

Inherited from PerftestConfiguration

Inherited from JourneyConfiguration

Inherited from HttpConfiguration

Inherited from Configuration

Inherited from Simulation

Inherited from AnyRef

Inherited from Any

Ungrouped