我在local.setting.json中设置本地主机端口.参考Microsoft doc https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local
该文件如下所示
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "",
"AzureWebJobsDashboard": ""
},
"Host": {
"LocalHttpPort": 7073
}
}
Run Code Online (Sandbox Code Playgroud)
当我运行/调试解决方案时,VS仍然在默认端口上托管应用程序(7071)
我已经检查了bin目录,该local.setting.json文件正在进行上述设置.从bin目录运行Azure Fucntion CLI(func host start)正确读取端口号.
看起来VS没有使用"LocalHttpPort"端口.设置中是否需要进行任何其他更改.我有Visual Studio 2017预览版(2)
使用 VisualStudio 和 XUnit 在本地环境中测试 AzureFunctions [C#、HTTP 触发器] 的最佳方法是什么?
假设我有以下两个 Azure 函数:
我想通过以下方式测试它们:
是否可以从 XUnit 环境同时运行这两个 AzureFunction ?如何实现这一目标?我不想使用 Azure Function 本身测试 .dll,我想使用 HTTP 请求测试它。