I have 4 repo/gatling projects. And there are many methods like login, logout, getItem, etc., which are duplicated across all those projects.
Is there a way to create a shared library (similar to node modules) and import those library and call them in those projects instead of duplicating lot of methods across projects?
So this is my case. I have an object file Login.scala across three projects/repositories. Content in these files are the same. There are many such files which can be shared across projects/repositories.
So back to my question, Is there a way to create a shared library (similar to node modules) and import those library and call them in those projects instead of duplicating lot of methods across projects?
I have created a couple of maven artefacts that I published to our internal maven repository. In my Gatling projects I simply declare the dependency in the pom.xml and add the import statements in the Gatling scripts, so I can then execute stuff like SharedActions.login, SharedActions.logout, etc.
Read up on maven if you haven’t done so previously.