2017-04-21 30 views
0

在我的解決方案也有幾個項目,有些是使用NUnit 2,有些是使用NUnit 3.解決方案包含NUnit的2和NUnit 3次的測試中,我得到UnsupportedFrameworkException在TFS構建

他們有相關的測試適配器和通過NuGet安裝的版本。

當我的TFS構建運行時,我得到的錯誤:

Error: Exception NUnit.Core.UnsupportedFrameworkException, Exception thrown executing tests in E:\BuildAgents\Agent1_work\9\s\Kittens_Local\Kitten\kitten\kitten\Kitten.Fluffy.Tests\bin\Debug\Kitten.Fluffy.Tests.dll

該項目,而其他測試使用的版本2

使用第3版是否有可能獲得無論是在同時工作TFS?

回答

1

這似乎是Nunit2適配器中的一個問題(Nunit TestAdapter Nuget Packag e)。所以你不能同時在TFS中同時工作。更多詳細信息,請參閱在這個問題上查理的回答是:nunit tests throwing exception only when run as part of tfs msbuild process

If you have both adapters installed, each one will run the tests for which they are designed. Each of them will display a message in for any assembly that they do not support. The message isn't meant to be an error and we try to word it in such a way that it won't be taken as such. However, we felt we have to give it just in case you expected the assembly to be handled by that particular adapter. Passing it by silently seems wrong.

When running under the VS IDE, the message does not cause a failure in the test run. It appears that running under TFS does cause a failure. If memory serves, we fixed this problem for the NUnit 3 adapter but not (yet) for the NUnit 2 adapter.

+0

啊哈!所以按照預期工作。我想沒有解決方法,這是有問題的,因爲它沒有構建。非常感謝。 – NibblyPig

相關問題