CsvFeeder

uk.gov.hmrc.performance.feeder.CsvFeeder
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.

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

Graph
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

Members list

Type members

Inherited classlikes

class GroupedIterator[B >: A](self: Iterator[B], size: Int, step: Int)

Attributes

Inherited from:
Iterator
Supertypes
class AbstractIterator[Seq[B]]
trait Iterator[Seq[B]]
trait IterableOnceOps[Seq[B], Iterator, Iterator[Seq[B]]]
trait IterableOnce[Seq[B]]
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

override def hasNext: Boolean

Attributes

Definition Classes
Iterator
override def next(): Map[String, String]

Attributes

Definition Classes
Iterator

Inherited methods

final def ++[B >: Record[String]](xs: => IterableOnce[B]): Iterator[B]

Attributes

Inherited from:
Iterator
final def addString(b: StringBuilder): b.type

Attributes

Inherited from:
IterableOnceOps
final def addString(b: StringBuilder, sep: String): b.type

Attributes

Inherited from:
IterableOnceOps
def addString(b: StringBuilder, start: String, sep: String, end: String): b.type

Attributes

Inherited from:
IterableOnceOps
def buffered: BufferedIterator[Record[String]]

Attributes

Inherited from:
Iterator
protected def cachedResource(path: String): Validation[Resource]

Attributes

Inherited from:
ResourceCache
def collect[B](pf: PartialFunction[Record[String], B]): Iterator[B]

Attributes

Inherited from:
Iterator
def collectFirst[B](pf: PartialFunction[Record[String], B]): Option[B]

Attributes

Inherited from:
IterableOnceOps
def concat[B >: Record[String]](xs: => IterableOnce[B]): Iterator[B]

Attributes

Inherited from:
Iterator
def contains(elem: Any): Boolean

Attributes

Inherited from:
Iterator
def copyToArray[B >: Record[String]](xs: Array[B], start: Int, len: Int): Int

Attributes

Inherited from:
IterableOnceOps
def copyToArray[B >: Record[String]](xs: Array[B], start: Int): Int

Attributes

Inherited from:
IterableOnceOps
def copyToArray[B >: Record[String]](xs: Array[B]): Int

Attributes

Inherited from:
IterableOnceOps
def corresponds[B](that: IterableOnce[B])(p: (Record[String], B) => Boolean): Boolean

Attributes

Inherited from:
IterableOnceOps
def count(p: (Record[String]) => Boolean): Int

Attributes

Inherited from:
IterableOnceOps
def distinct: Iterator[Record[String]]

Attributes

Inherited from:
Iterator
def distinctBy[B](f: (Record[String]) => B): Iterator[Record[String]]

Attributes

Inherited from:
Iterator
def drop(n: Int): Iterator[Record[String]]

Attributes

Inherited from:
Iterator
def dropWhile(p: (Record[String]) => Boolean): Iterator[Record[String]]

Attributes

Inherited from:
Iterator
def duplicate: (Iterator[Record[String]], Iterator[Record[String]])

Attributes

Inherited from:
Iterator
def exists(p: (Record[String]) => Boolean): Boolean

Attributes

Inherited from:
IterableOnceOps
def filter(p: (Record[String]) => Boolean): Iterator[Record[String]]

Attributes

Inherited from:
Iterator
def filterNot(p: (Record[String]) => Boolean): Iterator[Record[String]]

Attributes

Inherited from:
Iterator
def find(p: (Record[String]) => Boolean): Option[Record[String]]

Attributes

Inherited from:
IterableOnceOps
def flatMap[B](f: (Record[String]) => IterableOnce[B]): Iterator[B]

Attributes

Inherited from:
Iterator
def flatten[B](implicit ev: (Record[String]) => IterableOnce[B]): Iterator[B]

Attributes

Inherited from:
Iterator
def fold[A1 >: Record[String]](z: A1)(op: (A1, A1) => A1): A1

Attributes

Inherited from:
IterableOnceOps
def foldLeft[B](z: B)(op: (B, Record[String]) => B): B

Attributes

Inherited from:
IterableOnceOps
def foldRight[B](z: B)(op: (Record[String], B) => B): B

Attributes

Inherited from:
IterableOnceOps
def forall(p: (Record[String]) => Boolean): Boolean

Attributes

Inherited from:
IterableOnceOps
def foreach[U](f: (Record[String]) => U): Unit

Attributes

Inherited from:
IterableOnceOps
def grouped[B >: Record[String]](size: Int): GroupedIterator[B]

Attributes

Inherited from:
Iterator
def indexOf[B >: Record[String]](elem: B, from: Int): Int

Attributes

Inherited from:
Iterator
def indexOf[B >: Record[String]](elem: B): Int

Attributes

Inherited from:
Iterator
def indexWhere(p: (Record[String]) => Boolean, from: Int): Int

Attributes

Inherited from:
Iterator
override def isEmpty: Boolean

Attributes

Definition Classes
Iterator -> IterableOnceOps
Inherited from:
Iterator
def isTraversableAgain: Boolean

Attributes

Inherited from:
IterableOnceOps
final def iterator: Iterator[Record[String]]

Attributes

Inherited from:
Iterator
def knownSize: Int

Attributes

Inherited from:
IterableOnce
final def length: Int

Attributes

Inherited from:
Iterator
def map[B](f: (Record[String]) => B): Iterator[B]

Attributes

Inherited from:
Iterator
def max[B >: Record[String]](implicit ord: Ordering[B]): Record[String]

Attributes

Inherited from:
IterableOnceOps
def maxBy[B](f: (Record[String]) => B)(implicit ord: Ordering[B]): Record[String]

Attributes

Inherited from:
IterableOnceOps
def maxByOption[B](f: (Record[String]) => B)(implicit ord: Ordering[B]): Option[Record[String]]

Attributes

Inherited from:
IterableOnceOps
def maxOption[B >: Record[String]](implicit ord: Ordering[B]): Option[Record[String]]

Attributes

Inherited from:
IterableOnceOps
def min[B >: Record[String]](implicit ord: Ordering[B]): Record[String]

Attributes

Inherited from:
IterableOnceOps
def minBy[B](f: (Record[String]) => B)(implicit ord: Ordering[B]): Record[String]

Attributes

Inherited from:
IterableOnceOps
def minByOption[B](f: (Record[String]) => B)(implicit ord: Ordering[B]): Option[Record[String]]

Attributes

Inherited from:
IterableOnceOps
def minOption[B >: Record[String]](implicit ord: Ordering[B]): Option[Record[String]]

Attributes

Inherited from:
IterableOnceOps
final def mkString: String

Attributes

Inherited from:
IterableOnceOps
final def mkString(sep: String): String

Attributes

Inherited from:
IterableOnceOps
final def mkString(start: String, sep: String, end: String): String

Attributes

Inherited from:
IterableOnceOps
def nextOption(): Option[Record[String]]

Attributes

Inherited from:
Iterator
def nonEmpty: Boolean

Attributes

Inherited from:
IterableOnceOps
def padTo[B >: Record[String]](len: Int, elem: B): Iterator[B]

Attributes

Inherited from:
Iterator
def partition(p: (Record[String]) => Boolean): (Iterator[Record[String]], Iterator[Record[String]])

Attributes

Inherited from:
Iterator
def patch[B >: Record[String]](from: Int, patchElems: Iterator[B], replaced: Int): Iterator[B]

Attributes

Inherited from:
Iterator
def product[B >: Record[String]](implicit num: Numeric[B]): B

Attributes

Inherited from:
IterableOnceOps
def reduce[B >: Record[String]](op: (B, B) => B): B

Attributes

Inherited from:
IterableOnceOps
def reduceLeft[B >: Record[String]](op: (B, Record[String]) => B): B

Attributes

Inherited from:
IterableOnceOps
def reduceLeftOption[B >: Record[String]](op: (B, Record[String]) => B): Option[B]

Attributes

Inherited from:
IterableOnceOps
def reduceOption[B >: Record[String]](op: (B, B) => B): Option[B]

Attributes

Inherited from:
IterableOnceOps
def reduceRight[B >: Record[String]](op: (Record[String], B) => B): B

Attributes

Inherited from:
IterableOnceOps
def reduceRightOption[B >: Record[String]](op: (Record[String], B) => B): Option[B]

Attributes

Inherited from:
IterableOnceOps
protected def reversed: Iterable[Record[String]]

Attributes

Inherited from:
IterableOnceOps
def sameElements[B >: Record[String]](that: IterableOnce[B]): Boolean

Attributes

Inherited from:
Iterator
def scanLeft[B](z: B)(op: (B, Record[String]) => B): Iterator[B]

Attributes

Inherited from:
Iterator
def size: Int

Attributes

Inherited from:
IterableOnceOps
def slice(from: Int, until: Int): Iterator[Record[String]]

Attributes

Inherited from:
Iterator
def sliding[B >: Record[String]](size: Int, step: Int): GroupedIterator[B]

Attributes

Inherited from:
Iterator
def span(p: (Record[String]) => Boolean): (Iterator[Record[String]], Iterator[Record[String]])

Attributes

Inherited from:
Iterator
def splitAt(n: Int): (Iterator[Record[String]], Iterator[Record[String]])

Attributes

Inherited from:
IterableOnceOps
def stepper[S <: Stepper[_]](implicit shape: StepperShape[Record[String], S]): S

Attributes

Inherited from:
IterableOnce
def sum[B >: Record[String]](implicit num: Numeric[B]): B

Attributes

Inherited from:
IterableOnceOps
def take(n: Int): Iterator[Record[String]]

Attributes

Inherited from:
Iterator
def takeWhile(p: (Record[String]) => Boolean): Iterator[Record[String]]

Attributes

Inherited from:
Iterator
override def tapEach[U](f: (Record[String]) => U): Iterator[Record[String]]

Attributes

Definition Classes
Iterator -> IterableOnceOps
Inherited from:
Iterator
def to[C1](factory: Factory[Record[String], C1]): C1

Attributes

Inherited from:
IterableOnceOps
def toArray[B >: Record[String] : ClassTag]: Array[B]

Attributes

Inherited from:
IterableOnceOps
final def toBuffer[B >: Record[String]]: Buffer[B]

Attributes

Inherited from:
IterableOnceOps
def toIndexedSeq: IndexedSeq[Record[String]]

Attributes

Inherited from:
IterableOnceOps
def toList: List[Record[String]]

Attributes

Inherited from:
IterableOnceOps
def toMap[K, V](implicit ev: Record[String] <:< (K, V)): Map[K, V]

Attributes

Inherited from:
IterableOnceOps
def toSeq: Seq[Record[String]]

Attributes

Inherited from:
IterableOnceOps
def toSet[B >: Record[String]]: Set[B]

Attributes

Inherited from:
IterableOnceOps
override def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Iterator -> Any
Inherited from:
Iterator
def toVector: Vector[Record[String]]

Attributes

Inherited from:
IterableOnceOps
def withFilter(p: (Record[String]) => Boolean): Iterator[Record[String]]

Attributes

Inherited from:
Iterator
def zip[B](that: IterableOnce[B]): Iterator[(Record[String], B)]

Attributes

Inherited from:
Iterator
def zipAll[A1 >: Record[String], B](that: IterableOnce[B], thisElem: A1, thatElem: B): Iterator[(A1, B)]

Attributes

Inherited from:
Iterator
def zipWithIndex: Iterator[(Record[String], Int)]

Attributes

Inherited from:
Iterator

Deprecated and Inherited methods

final def /:[B](z: B)(op: (B, Record[String]) => B): B

Attributes

Deprecated
[Since version 2.13.0] Use foldLeft instead of /:
Inherited from:
IterableOnceOps
final def :\[B](z: B)(op: (Record[String], B) => B): B

Attributes

Deprecated
[Since version 2.13.0] Use foldRight instead of :\\
Inherited from:
IterableOnceOps
def aggregate[B](z: => B)(seqop: (B, Record[String]) => B, combop: (B, B) => B): B

Attributes

Deprecated
[Since version 2.13.0] For sequential collections, prefer `foldLeft(z)(seqop)`. For parallel collections, use `ParIterableLike#aggregate`.
Inherited from:
IterableOnceOps
final def copyToBuffer[B >: Record[String]](dest: Buffer[B]): Unit

Attributes

Deprecated
[Since version 2.13.0] Use `dest ++= coll` instead
Inherited from:
IterableOnceOps
final override def hasDefiniteSize: Boolean

Attributes

Deprecated
[Since version 2.13.0] hasDefiniteSize on Iterator is the same as isEmpty
Definition Classes
Iterator -> IterableOnceOps
Inherited from:
Iterator
def scanRight[B](z: B)(op: (Record[String], B) => B): Iterator[B]

Attributes

Deprecated
[Since version 2.13.0] Call scanRight on an Iterable instead.
Inherited from:
Iterator
def seq: Iterator.this.type

Attributes

Deprecated
[Since version 2.13.0] Iterator.seq always returns the iterator itself
Inherited from:
Iterator
final def toIterator: Iterator[Record[String]]

Attributes

Deprecated
[Since version 2.13.0] Use .iterator instead of .toIterator
Inherited from:
IterableOnceOps
final def toStream: Stream[Record[String]]

Attributes

Deprecated
[Since version 2.13.0] Use .to(LazyList) instead of .toStream
Inherited from:
IterableOnceOps