Skip to content

Commit

Permalink
Implement RegexFeeder
Browse files Browse the repository at this point in the history
  • Loading branch information
eevulution committed Sep 18, 2020
1 parent 277bb06 commit c288467
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/main/scala/ru/tinkoff/gatling/feeders/RegexFeeder.scala
Original file line number Diff line number Diff line change
@@ -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())
}

}

0 comments on commit c288467

Please sign in to comment.