Skip to content

Commit

Permalink
chore: clean up recorder task args and adapt to Gatling 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
slandelle committed Feb 20, 2024
1 parent 5308817 commit 66333b4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 23 deletions.
1 change: 0 additions & 1 deletion src/main/scala/io/gatling/sbt/settings/BaseSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,4 @@ object BaseSettings {
config / fork := true,
config / testGrouping := (config / testGrouping).value flatMap singleTestGroup
) ++ OssSettings.settings(config, parent) ++ EnterpriseSettings.settings(config)

}
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ object OssSettings {
private def recorderRunner(config: Configuration, parent: Configuration): Def.Initialize[InputTask[Int]] = Def.inputTask {
// Parse args and add missing args if necessary
val args = optionsParser.parsed
val simulationsForlderArg = toShortOptionAndValue("sf" -> (config / scalaSource).value.getPath)
val simulationsFolderArg = toShortOptionAndValue("sf" -> (config / scalaSource).value.getPath)
val resourcesFolderArg = toShortOptionAndValue("rf" -> (config / resourceDirectory).value.getPath)
val allArgs = addPackageIfNecessary(args ++ simulationsForlderArg ++ resourcesFolderArg, organization.value)
val formatArg = toShortOptionAndValue("pkg", "scala")
val allArgs = addPackageIfNecessary(args ++ simulationsFolderArg ++ resourcesFolderArg ++ formatArg, organization.value)

val fork = new Fork("java", Some("io.gatling.recorder.GatlingRecorder"))
val classpathElements = (parent / dependencyClasspath).value.map(_.data) :+ (config / resourceDirectory).value
Expand Down
26 changes: 6 additions & 20 deletions src/main/scala/io/gatling/sbt/utils/StartRecorderUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,36 +25,22 @@ private[gatling] object StartRecorderUtils {
* List of all CLI options supported by the Recorder, in their "short" version.
*/
val shortRecorderOpts = Set(
"lp",
"lps",
"ph",
"pp",
"pps",
"ar",
"rbf",
"sf",
"rf",
"cn",
"pkg",
"enc",
"fr",
"fhr"
"fmt"
)

/**
* List of all CLI options supported by the Recorder, in their "full" version.
*/
val fullRecorderOpts = Set(
"local-port",
"local-port-ssl",
"proxy-host",
"proxy-port",
"proxy-port-ssl",
"request-bodies-folder",
"simulations-folder",
"resources-folder",
"class-name",
"package",
"encoding",
"follow-redirect",
"automatic-referer",
"fetch-html-resources"
"format"
)

/** Parser matching the help option, in short and full version. */
Expand Down

0 comments on commit 66333b4

Please sign in to comment.