Library of Common Code

I have three different products that I have Gatling code to test. My projects are all in git, and the source folders lie outside the Gatling folder. I use a shell script to start Gatling, and tell it where everything is.

Over time, I’ve started putting together bits of code that I would like to be able to use across all of my Gatling projects.

The first thought that came to mind was to use CLASSPATH to point to it. But then I would have to compile it myself.

The second thought was to use a symlink within my simulation folder at the right place to pull in the common code. Then, Gatling would (probably) compile my code automatically on startup.

But I’m sure I’m not the first person in this boat. How do you have your library of shared utility code across Gatling projects?

I’m pretty sure people who’ve doing this so far are mostly Scala devs, so they compile themselves.

What can I say. I’m lazy. :slight_smile:

Hi John,

I would suggest using gatling-sbt which will pull down the gatling plugin when you start SBT. You could keep you libraries in a lib folder undo src/test/scala/lib.


basic example: