Jmeter对多个api控制器的负载测试

时间:2021-04-21 11:09:04

标签: c# .net api jmeter controller

是否可以在不指定[controller]参数的情况下测试多个api控制器

enter image description here

像下面一样,只写/api,测试ValuesController和WeatherForecastController。两者都是HttpGet,不需要任何参数。

enter image description here

1 个答案:

答案 0 :(得分:0)

不幸的是,您的屏幕截图信息量不大,我的期望是在单个 API 端点上不能有 2 个控制器,它们需要不同。

如果你的代码中有这样的东西:

[Route("api/[controller]")]

那么你应该可以访问:

  • ValuesController.cs 作为 /api/ValuesController
  • WeatherForecastController.cs 作为 /api/WeatherForecastController

更多信息: