diff --git a/src/main/scala/ru/tinkoff/gatling/feeders/RegexFeeder.scala b/src/main/scala/ru/tinkoff/gatling/feeders/RegexFeeder.scala new file mode 100644 index 0000000..e895a19 --- /dev/null +++ b/src/main/scala/ru/tinkoff/gatling/feeders/RegexFeeder.scala @@ -0,0 +1,13 @@ +package ru.tinkoff.gatling.feeders + +import io.gatling.core.feeder.Feeder +import com.mifmif.common.regex.Generex + +object RegexFeeder { + + def apply(paramName: String, regex: String): Feeder[String] = { + val generex = new Generex(regex).iterator() + feeder[String](paramName)(generex.next()) + } + +}