如何从java代码运行gatling测试,并通过模拟参数中的测试url?
我希望能够从java代码向Gatling模拟传递参数,特别是测试的url。我使用了Gatling和maven方法。请帮帮我。一种方法是: 例如,我需要通过测试下的URL 要在scala代码中选取此变量,请执行以下操作:如何从java代码运行gatling测试,并通过模拟参数中的测试url?,java,spring-boot,maven,gatling,scala-gatling,Java,Spring Boot,Maven,Gatling,Scala Gatling,我希望能够从java代码向Gatling模拟传递参数,特别是测试的url。我使用了Gatling和maven方法。请帮帮我。一种方法是: 例如,我需要通过测试下的URL 要在scala代码中选取此变量,请执行以下操作: val foo_url = System.getProperty("foo") 要在模拟中使用此foo_url: val httpProtocol = http //.baseUrl("http://127.0.0.1:5000"
val foo_url = System.getProperty("foo")
要在模拟中使用此foo_url:
val httpProtocol = http
//.baseUrl("http://127.0.0.1:5000")
.baseUrl(foo_url)
我可以知道你收到的错误吗?如果可能的话,还有一个关于代码外观的代码片段。感谢它现在可以工作了。我的错误是将URL设置在“”和“”之间
val httpProtocol = http
//.baseUrl("http://127.0.0.1:5000")
.baseUrl(foo_url)