Gatling Maven exception

Hi Team,

New to Gatling as well as Maven. When I call the simulation class through CLI. I’m getting a maven lifecycle exception message.

Command

mvn gatling:test -Dgatling.simulationClass=simulationOne

Error Message

Unknown lifecycle phase “.simulationClass= simulationOne”. You must specify a valid lifecycle phase or a goal in the format : or :[:]:. Available lifec
ycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources,
test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. → [H
elp 1]

POM.xml


io.gatling.highcharts
gatling-charts-highcharts
${gatling.version}
test


io.gatling
gatling-app
${gatling.version}


io.gatling
gatling-recorder
${gatling.version}

src/test/scala io.gatling gatling-maven-plugin ${gatling-maven-plugin.version} test

I suspect you have non-printable characters in your command, maybe because you’ve copy-pasted it from somewhere else.
Try typing characters manually.

Stephane,

I manually type the command, but still facing the same error.

Path of the simulation class
src/test/scala/simulationOne.scala

Error message

Unknown lifecycle phase “.simulationClass= simulationOne”. You must specify a valid lifecycle phase or a goal in the format : or :[:]:. Available lifec
ycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources,
test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. → [H
elp 1]

Sorry, no idea what goes wrong on your side.
Check the official sample and you’ll see the command works just fine: https://github.com/gatling/gatling-maven-plugin-demo

@Stéphane Landelle

When I ran the below command it ran fine.

mvn gatling:test -D"gatling.simulationClass= simulationOne"

Any reason for this.