2016-07-06 62 views
2

我有一個TFS 2015服務器需要執行我的C#代碼的代碼覆蓋。讓Team Foundation Server 2015做代碼覆蓋的選項

我嘗試了一些東西,延長其工作是一定的,但不是在所有優化: *我安裝NUnit.WithFramework,與OpenCoverReportGenerator一起,把它發佈在.htm文件的神器 - 這給我看了報道,但需要大量的點擊才能看到它。而且這還不是在專用字段中顯示的代碼覆蓋率:

enter image description here

什麼是需要它來顯示我的代碼覆蓋率?我的服務器上是否需要Visual Studio Enterprise 2015?

其他任何方法都無法構建並顯示我的代碼覆蓋率?

更新:

當運行的版本,下面的警告拋出:

2016-07-06T08:30:31.0461215Z Warning: Using Isolation mode to run the tests as diagnostic data adapters were enabled in the runsettings. Use the /inIsolation parameter to suppress this warning. 

2016-07-06T08:30:34.3147483Z Warning: Diagnostic data adapter message: Could not find diagnostic data adapter 'Code Coverage'. Make sure diagnostic data adapter is installed and try again. 

看來我需要一個診斷數據適配器,這是described here - 我會嘗試申請這樣看看會發生什麼。

回答

2

在構建服務器上安裝Visual Studio,這似乎是要返回代碼覆蓋結果的要求。需要

微軟的Visual Studio將在下列情況下生成服務器上安裝:

  • 構建任何CPP測試項目,則必須安裝Visual Studio Professional或更高版本。
  • 要運行單元測試或編碼的UI測試,必須安裝Visual Studio Professional或更高版本。
  • 要使用的數據和診斷數據適配器:

代碼覆蓋率:Visual Studio的保費或更高版本。
測試影響: Visual Studio Ultimate。
IntelliTrace:Visual Studio Ultimate。

  • 要構建構建機器上的任何現代風格的應用程序:Visual Studio中 旗艦版或Visual Studio Express的爲Windows 8( 構建服務器上的操作系統必須是Windows 8)。
  • 編譯並用僞造的組裝項目運行測試:視覺 Studio旗艦

請參閱從MSDN源鏈接:Run tests in your build process

+1

只要你有MSDN沒有額外的許可證構建代理上需要Visual Studio。 –