无法在自行配置的负载测试平台上找到空闲机器

Unable to find free machine on self-provisioned load test rig

我们最近一直在执行负载测试作为构建的一部分(使用 Cloud Load Test 构建任务),使用使用以下快速启动模板部署的自配置负载测试装备 -

https://github.com/Azure/azure-quickstart-templates/tree/master/101-vsts-cloudloadtest-rig

这对我们来说一直运作良好,但似乎发生了一些变化,这个过程不再有效。当负载测试任务启动时,我们现在收到以下错误:

2017-04-24T14:32:07.4831251Z [Message]This load test was run using self-provisioned rig 'default'. No virtual-user minutes (VUMs) will be charged for this run.
2017-04-24T14:32:07.4881254Z ##[error]Microsoft.PowerShell.Commands.WriteErrorException: Test run could not be started using the self-provisioned rig 0ebc4aad-33b2-495e-a75a-213d4607976b. Number of free machines available in the rig are less than the required number. (Requested – 1, Available - 0, In-Use – 0, Offline – 3).

使用 ManageVSTSCloudLoadAgent。ps1 脚本

https://blogs.msdn.microsoft.com/visualstudioalm/2016/08/23/testing-privateintranet-applications-using-cloud-based-load-testing/

我可以看到有一个名为 "LoadTesting" 的代理组,其中包含我配置的两个 VM,它们都显示为免费。但是,此 LoadTesting 组的 GUID 与生成任务尝试使用的错误消息中的 GUID 不匹配。根据脚本,只有一个装备可用,所以我不知道云任务从哪里获得另一个装备。

如何更改任务以使用正确的组?或者将“LoadTesting”组更改为默认组?

我无法在负载测试定义中或通过团队服务站点找到任何可以更改它使用的装备的地方。

问题已解决 - 之前不知道它是如何工作的,但解决方案是将以下上下文参数添加到我们所有的负载测试中。

这实际上是在我在问题中发布的 link 上指定的,但由于他们以前工作过而被忽略了。

Context parameter name – UseStaticLoadAgents
Context parameter value – true
Context parameter name – StaticAgentsGroupName
Context parameter value – <name of the agent group>