简体   繁体   中英

Can I have a custom Setup method in gatling

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM