uk.gov.hmrc.performance.feeder

Members list

Type members

Classlikes

class CsvFeeder(feederFile: String)(implicit configuration: GatlingConfiguration) extends Feeder[String], ResourceCache

Implements Gatling's Feeder to feed test data from a CSV file. The CSV records are available in Gatling's session for use during the test.

Implements Gatling's Feeder to feed test data from a CSV file. The CSV records are available in Gatling's session for use during the test.

Example:

username,password
bob,12345678
alice,87654321

The provided CSV can also contain placeholders to generate dynamic data from a single record.

Example with random placeholder:

username,password
my-${random}-user,12345678

In the above CSV, ${random} is replaced with a random int value

Other available placeholders:

${currentTime} - replaced with the current time in milliseconds

${range-X} - replaced by a string representation of number made of X digits.

The number is incremental and starts from 1 again when it reaches the max value. For example ${range-3} will be replaced with '001' the first time, '002' the next and so on.

Value parameters

configuration

GatlingConfiguration provided implicitly

feederFile

name of the feeder file with directory. Example: data/helloworld.csv.

Attributes

Constructor

creates a new feeder from a CSV file

Supertypes
trait ResourceCache
trait Iterator[Record[String]]
trait IterableOnceOps[Record[String], Iterator, Iterator[Record[String]]]
trait IterableOnce[Record[String]]
class Object
trait Matchable
class Any
Show all