GatlingPropertiesBuilder, RecorderPropertiesBuilder not found during build in gatling 3.11.2

Gatling version: 3.11.2 (must be up to date)
Gatling flavor: java kotlin scala
Gatling build tool: maven gradle sbt bundle

I read the guidelines and how to ask a question topics.
I provided a SSCCE (or at least, all information to help the community understand my topic)
I copied output I observe, and explain what I think should be.

Hello in 3.11.2 the Gradle 8.0.2 cannot build our solution because it cannot find these classes anymore:

GatlingPropertiesBuilder, RecorderPropertiesBuilder. How can we work around this problem?

These classes no longer exists. Please launch gradle/gradlew instead.
Note: the gradle plugin now has a task for launching the recorder.

@slandelle

the problem is that we had some custome logic implemented in Engine.scala. It seems since the GatlingPropertiesBuilder is gone, the Engine is gone as well. At least this is what we infer from comparing 3.11.2 demo and the gatling academy setup using 3.5

our code looks like this to manage execution flow as in run a simulation to prepare data on SUT, then run test. Or run test without data preparation etc.

object Engine extends App {

	Configuration.load(args)

	private var codePreparation = StatusCode.Success.code;

	if (withPreparation) {
		if (withIdp) {
			val cbLoadTestPropertiesWithIdp = new GatlingPropertiesBuilder()
				.simulationClass(classOf[PreparationIdpAuth].getName)
			codePreparation = Gatling.fromMap(cbLoadTestPropertiesWithIdp.build)
		} else {
			val cbLoadTestPropertiesWithBasicAuth = new GatlingPropertiesBuilder()
				.simulationClass(classOf[PreparationBasicAuth].getName)
			codePreparation = Gatling.fromMap(cbLoadTestPropertiesWithBasicAuth.build)
		}
	}

	if (StatusCode.Success.code != codePreparation) {
		System.exit(codePreparation)
	}

	if (withTest) {
		if (withIdp) {
			val cbLoadTestPropertiesWithIdp = new GatlingPropertiesBuilder()
				.simulationClass(classOf[CbLoadTestIdpAuth].getName)
			Gatling.fromMap(cbLoadTestPropertiesWithIdp.build)
		} else {
			val cbLoadTestPropertiesWithBasicAuth = new GatlingPropertiesBuilder()
				.simulationClass(classOf[CbLoadTestBasicAuth].getName)
			Gatling.fromMap(cbLoadTestPropertiesWithBasicAuth.build)
		}
	}
}

our build.gradle.properties looks like this

val environment = System.getenv()

val MAVEN_PUBLIC_REPOSITORY = "https://jfrog.devstack.xx.com/artifactory/maven-public"
val ARTIFACTORY_USER        = environment["ARTIFACTORY_USER"]       ?: error("ARTIFACTORY_USER variable not found")
val ARTIFACTORY_PASSWORD    = environment["ARTIFACTORY_PASSWORD"]   ?: error("ARTIFACTORY_PASSWORD variable not found")

plugins {
    id("java")
    id("scala")
    id("application")
    id("com.github.johnrengelman.shadow") version "8.1.1"
}

dependencies {
    implementation("io.gatling.highcharts:gatling-charts-highcharts:3.10.4")
    implementation("org.apache.httpcomponents:httpclient:4.5.14")
}

repositories {
    maven {
        url = uri(MAVEN_PUBLIC_REPOSITORY)
        credentials {
            username = ARTIFACTORY_USER
            password = ARTIFACTORY_PASSWORD
        }
    }

    mavenLocal()
}

java {
    sourceCompatibility = JavaVersion.VERSION_17
    targetCompatibility = JavaVersion.VERSION_17
}

application {
    mainClass.set("com.xx.codebeamer.cbloadtests.Engine")
}

tasks.register("artifactoryPublish") {
    // Cheat on Bamboo
    println("Cheating artifactoryPublish")
}




The actions would then be:

  1. we change our build gradle to look smth like the build gradle on gatling 3.11.2 demo
  2. transfer the logic managing the execution flow to somewhere else but where?

we had some custome logic implemented in Engine.scala

This is your custom launcher. Sorry but that’s not something we can help with here as these are typically features we provide in Gatling Enterprise.

These launchers we removed were only meant to ease launching locally from your IDE.

the gatling academy setup using 3.5

I agree this is something we need to clean/update.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.