GerritForge / gatling-sbt-gerrit-test

Gatling SBT-based tests for Gerrit Code Review
2 stars 2 forks source link

'Gatling$ - Run crashed error' during GerritRestSimulation simulation #1

Open jykgit201 opened 1 year ago

jykgit201 commented 1 year ago

While executing gerritforge.GerritRestSimulation test with gatling-sbt, console showing below error.

sbt:gatling-sbt-gerrit-test> gatling:testOnly gerritforge.GerritRestSimulation 11:02:16.000 [ERROR] i.g.a.Gatling$ - Run crashed java.lang.Exception: ConvertFailure(KeyNotFound(project.Set()),Some(ConfigOrigin(application.conf @ file:/home//gatlling_test/gatling-sbt-gerrit-test/target/scala-2.12/test-classes/application.conf)),gerrit) at gerritforge.GerritTestConfig$.(GerritTestConfig.scala:16) at gerritforge.GerritTestConfig$.(gerritRestSimulation.scala:17) . . . [error] Simulation GerritRestSimulation failed [info] Simulation(s) execution ended [error] Failed tests: [error] gerritforge.GerritRestSimulation [error] (Gatling / testOnly) sbt.TestsFailedException: Tests unsuccessful [error]Total time: 3 s, completed Dec 22, 2022 11:02:16 AM

note: simulation.env is already populated with environment specific data.

DanieleSassoli commented 1 year ago

You're running gatling:test from within sbt, looks like you need to set the project as an environment variable. The environment file is not loaded when running from within sbt but only when running as a docker container.