Can I have a custom Setup method in gatling

心不动则不痛 提交于 2019-12-13 02:08:17

问题


I want to have a custom setup method like for a test where i talk to a webservice and get initial values. Can i do this in gatling?I only want to run this once per simulation.


回答1:


You can use the before hook to perform any custom code before running the simulation. Note that you can't use Gatling's DSL in there. But you can use whatever Java HTTP client you want, from java.net.UrlConnection to AsyncHttpClient that Gatling ships.



来源:https://stackoverflow.com/questions/28439925/can-i-have-a-custom-setup-method-in-gatling

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