我的团队正在尝试将Chutzpah集成到TFS 2012的构建过程中。我们以this blog post为起点。

从较高的角度来看,实际的问题是,在构建代理程序上下文中的Visual Studio测试运行器根本没有找到Chutzpah Hook 。因此,尽管我们可以将**\*.js定义为测试源,但实际上并未找到并初始化Chutzpah bootstrap ,但是测试运行程序对这些文件不执行任何操作。

在更详细的级别上,当我们检查用于加载构建 Controller 的定制程序集的日志时,我们会收到三个相关消息:

Summary: There were 0 failures, 2 errors and 1 warnings loading custom activities and services.
Error: Method 'ToXml' in type 'Chutzpah.VS2012.TestAdapter.ChutzpahAdapterSettings' from assembly 'Chutzpah.VS2012.TestAdapter, Version=2.2.0.171, Culture=neutral, PublicKeyToken=1ca802c37ffe1896' does not have an implementation.
Error: API restriction: The assembly '...\AppData\Local\Temp\VSTFSBuild\8c8e9402-1169-4782-99a9-ce42f83be8f0\A1288811191\Chutzpah\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll' has already loaded from a different location. It cannot be loaded from a new location within the same appdomain.
Warning: Could not load file or assembly '...\AppData\Local\Temp\VSTFSBuild\8c8e9402-1169-4782-99a9-ce42f83be8f0\A1288811191\Chutzpah\phantomjs.exe' or one of its dependencies. The module was expected to contain an assembly manifest.

除了这些信息,我们或多或少地陷入困境。我很想听到实际上已经在独立的2012构建服务器上运行Chutzpah的人的消息,以便我们可以比较配置。

最佳答案

错误:API限制:程序集'....

表示TFS正在两个不同的位置找到一个dll。您可以将模式更改为“检查”,以查看是否具有\*\* test.dll作为任何测试程序集的值集,并将其更改为* test * .dll。这样可以防止它多次加载。

另一个错误可能是因为未重建测试项目。
尝试重新构建测试项目。

我希望这有帮助。

关于tfs - Chutzpah与TFS 2012集成,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/13184146/

10-13 08:16
查看更多