Performance Testing Custom Java SDK with Gatling


I am new to both Gatling and scala. I am having a requirement to performance test a Payment product Java SDK. I cant test the endpoint directly due to encryption complexity involved. Currently they have couple of test cases written with JSR223 preprocessor with Jmeter.
Since we started adapting Gatling for our API testing, we want to use it for testing this SDK as well if possible. Here’s where i need help with:

  1. I have written scala functions to call the SDKs within gatling script. But i am not clear how i will be calling them within scenario declaration since these are not HTTP calls?
  2. What is the basis i will create assertions to say if the transaction has passed/failed since it doesnt have a return type except success messages or exceptions.

Any pointers/documentation on the same will be greatly appreciated.



Assertions are checks in Gatling. you can verify a success message like this

.check(jsonPath("""$.model.instanceSaved""").is("true"))) if it is json response else you can use regex.