我正在與TFS BuildServer + TestControler +多個TestAgent進行集成環境。有沒有辦法在* .runsettings文件中加入'Remote Controller name'?
此前我使用* .testsettings文件並在角色下定義遠程服務器。
我將BuildServer更新爲VS2013,並引入了SpecRun以進行測試執行。
由於我有一個TFS自定義* .srprofile文件,我不得不使用.runsettings文件而不是.testsettings文件。
我找不到標籤,我可以在.runsettings文件中定義「遠程控制器名稱」。
有沒有辦法在* .runsettings文件中包含'Remote Controller name'?
我對構建配置非常陌生。任何洞察力高度讚賞。
其他細節:
我發現this文章和定義的.runsettings文件中的.testsettings文件路徑。以下是根據文章更改的文件。 但它不工作。 可能是SpecRun適配器不支持標籤。
我使用的TestSettings文件。
<?xml version="1.0" encoding="UTF-8"?>
<TestSettings name=".........." id="........." xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
<Description>Remote settings for running the tests on.....</Description>
<Deployment>
....
</Deployment>
<RemoteController name=".....local:6901" />
<Execution location="Remote">
<TestTypeSpecific>
<UnitTestRunConfig testTypeId=".....">
<AssemblyResolution>
<TestDirectory useLoadContext="true" />
</AssemblyResolution>
</UnitTestRunConfig>
</TestTypeSpecific>
<AgentRule name=".....">
</AgentRule>
</Execution>
<Properties />
</TestSettings>
樣品* .runsettings文件我現在使用。
<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
<!-- Configurations that affect the Test Framework -->
<RunConfiguration>
<!-- Path relative to solution directory -->
<ResultsDirectory>......</ResultsDirectory>
</RunConfiguration>
<SpecRun>
<Profile>TFS.srprofile</Profile>
<ReportFile>TestResults.html</ReportFile>
<GenerateSpecRunTrait>true</GenerateSpecRunTrait>
<GenerateFeatureTrait>false</GenerateFeatureTrait>
<SettingsFile>.....\Remote.AutoTest_2013.testsettings</SettingsFile>
<ForcedLegacyMode>true</ForcedLegacyMode>
</SpecRun>
</RunSettings>
嗨,我試圖做同樣的事情,但我不相信這是可能的。如果您閱讀此https://msdn.microsoft.com/en-us/library/ms182486.aspx,則表示mstest.exe可以使用控制器,但沒有提及vstest,它使用runsettings文件。看起來好像不太可能在控制器/代理配置中使用vstest,我還沒有找到替代方案。 –
我有相同的研究成果。如果您找到任何替代方法,請提供足夠的信息告訴我。我很想知道。謝謝.. –