sbt-gatling and subprojects

I"m trying to get gatling tests to run from the same sbt project as the code they are testing.

I assumed this was part of the design of this plugin…?

I’m able to get the tests running fine from an sbt project with no subprojects, but when I include the code I want tested into the project in src/main, sbt was unable to detect a main class.

In an effort to get around this, I created a subproject for the gatling tests. Now sbt can find my main class, but I can’t run my simulations…

Here is the repo:

to run the main app: sbt run

For the gatling tests, I’d like to: sbt “project gatling” test

I have read the plugin docs… is what I’m attempting possible?


@pdalpra Ping :wink:

What is the exact issue ? that you can’t in a single command both run a main class AND run Gatling simulations ?
If so, sorry but that’s not possible without either runing a command in the background or by having two terminals open, one running the main and the other one running Gatling.

On the other part of your question (running tests in a submodule), the issue is that you have two projects, but you have no ‘root’ project to aggregate both submodules, allowing SBT and the Gatling plugin to find your simulations in your subproject across your submodules.
See : Gatling has a root module, gatling-parent, that aggregates all others modules.



sbt rock star!