What is the proper way of running Gatling from a stand-alone application

旧巷老猫 提交于 2019-12-23 12:52:39

问题


I need to start a Gatling simulation from a main application. The use case is as follows:

  • The application reads a specification, and generate test cases based on this specification.
  • The test cases are converted into Gatling scenarios.
  • The scenarios are run in a Gatling simulation.

So far I managed to do this via the sbt plugin. However this is inconvenient if we want to reuse the tool I'm developing in other contexts (imagine non-scala projects for instance).

Since I'm generating Gatling scenarios dynamically which means that I cannot simply pass a Scala class to the Gatling binary.

I was able to run the simulation as follows:

Gatling.fromArgs(args, Some(classOf[Simulation]), _ => new ValidationTest)

Where ValidationTest is the class that generates the scenarios dynamically. However, I'm not sure that is the proper way of using Gatling in a standalone application.

来源:https://stackoverflow.com/questions/38716587/what-is-the-proper-way-of-running-gatling-from-a-stand-alone-application

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!