【问题标题】:VS Web Tests (MSTest) - How to set "One run per datasource row" when running from vstest.consoleVS Web 测试 (MSTest) - 从 vstest.console 运行时如何设置“每个数据源行运行一次”
【发布时间】:2018-07-30 07:50:52
【问题描述】:
我在 Visual Studio 中使用“每个数据源行运行一次”设置:
正如对话框所说,这没有保存。
如何将设置提供给vstest.console.exe?
编辑:我认为测试设置编辑器中曾经有一个 Web 测试 选项卡,我可以在其中进行设置。 MSDN docs,下面截图来自this article by John Peters。
我的(VS 2017 Enterprise)测试设置编辑器没有显示所有这些选项卡。只有General、Deployment、Setup and Cleanup Scripts 和Additional Settings。
【问题讨论】:
标签:
mstest
vstest
vstest.console.exe
vstest.console
【解决方案1】:
我使用的是 VS 2017 性能和负载测试项目附带的默认 Local.testsettings。
事实证明,如果您将末尾的“LoadTest”手动编辑为“WebTest”,则会出现所有缺失的选项卡。包括 Web Test 选项卡,其中包含我需要的选项。
<?xml version="1.0" encoding="UTF-8"?>
<TestSettings name="Local" id="f541a35f-e46f-453e-82d1-813b068f8a1c" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
<Description>These are default test settings for a local test run.</Description>
<Deployment enabled="false" />
<Execution>
<TestTypeSpecific />
<AgentRule name="Execution Agents">
</AgentRule>
</Execution>
<Properties>
<Property name="TestSettingsUIType" value="LoadTest" />
</Properties>
</TestSettings>