简体   繁体   中英

Chutzpah integration with TFS 2012

My team is trying to integrate Chutzpah into the TFS 2012 build process. We used this blog post as our starting point.

At a high level, the practical issue is that the Visual Studio Test Runner in the build agent context simply isn't finding the Chutzpah hooks. So while we can define **\\*.js as a test source, without the Chutzpah bootstrapper actually being found and initialized, the test runner doesn't do anything with these files.

At a more detailed level, we are getting three concerning messages when we check the logs for loading the custom assemblies for the build 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.

Other than this information, we're more or less stuck. I'd love to hear from someone who has actually got Chutzpah running on a standalone 2012 build server so we can compare configurations.

Error: API restriction: The assembly '....

Indicates that TFS is finding a dll in two different locations. You can change the pattern to Check and see if you have \\*\\* test .dll as the value set for any test assemblies and change it to *test*.dll. This will prevent it loading it multiple times.

The other error might be because the test projects are not being rebuilt. Try re-building the test projects.

I hope this helps.

Actually Software Carpenter has a point, I believe what may be happening is your test spec for ordinary unit tests may be test .dll (or something similar) this means Microsoft.VisualStudio.TestPlatform.ObjectModel.dll is loaded as a unit test dll, then TFS tries loading it again when trying to run the chutzpah tests.

Try disable the normal unit test spec and see if it helps, if it does then change your spec to be something else (*test.dll) that doesn't incude TestPlatform.ObjectModel.dll.

Source: I just had the same error when trying to build a project with Test in its name.

This discussion is also taking place on Codeplex. Maybe some help can be provided there.

Javascript Unit Tests on Team Foundation Service with Chutzpah

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM