I am using Karate-Gatling maven based code to run performance tests, and below is the code to call feature file from scala script
setUp((scenario("API Test").exec(karateFeature("classpath:<PATH_TO_FEATURE_FILE>", "@perfTest"))).inject(rampUsers(50).during(10)))
This code works fine but I want to pass the tag “@perfTest” dynamically using a variable.
But when I tried using a scala variable name instead of directly giving tag name in the above code it failed.
I tried the following approach
var tag: String = "@perfTest" setUp((scenario("API Test").exec(karateFeature("classpath:<PATH_TO_FEATURE_FILE>", tag))).inject(rampUsers(50).during(10)))
This code does not work.
Is it possible to use scala variable name while calling ‘karateFeature’ ?
1