How can I use a new scenario, written in Java, within a simulation written in scala?
Hi @akastanis,
Welcome aboard!
Without more information, it is hard to help you. Help us to help you by providing some code.
I imagine the scenario is a public static ScenarioBuilder javaScenario
in a public class ScenarioUtils
class.
You should be able to call it from scala in the case they are in the same project (or the java code is a dependency of your scala project).
This question is not specific to gatling.
You can find documentation on the internets for interopability between Java and Scala.
But, indeed, it is not as clean as the scala creators would like (kotlin made a better job in that subject).
As @slandelle wrote below, Gatling Java and Gatling scala are 2 distinct APIs that are not compatible.
Hope it helps!
Cheers!
Hi,
If what you have in mind is mixing Gatling Java and Gatling Scala, that’s not possible. They are not compatible with each other. You could have them live in the same code base, but not interact with each other.
And I definitely wouldn’t recommend trying to use Gatling Scala from Java, you’d be going down a rabbit hole and suffering from frequent breaking changes.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.