0
我嘗試在TFS2015(測試運行器是mstest,使用MVC Core框架)的構建步驟中使用「dotnet測試」運行特定測試。指定要使用「dotnet測試」運行的測試組
在.NET 4.5中,我使用構建的Visual Studio測試步驟時,除了加入anotation這樣[TestCategory("Unit"), TestMethod()]
或[TestCategory("Integration"), TestMethod()]
每種方法在測試過濾器簡單地指定一個參數,例如"TestCategory=Unit"
。
無論如何要做類似的事情,使用MStest或其他框架?
感謝,最後,我結束了使用Visual Studio的測試,但我還是不能只觸發標有TestCategory = 「單位」 測試當使用TestFilter參數時(我在運行測試時,在桌面上的VisualStudio中也無法識別這個參數),我最終做了單元測試和集成測試的單獨測試項目。 –