2016-11-17 59 views
0

使用TFS 2015年生成... 我明白通配符是如何工作的,我已經閱讀格式的文檔,但我沒有得到預期的結果在測試大會場使用它們時的Visual Studio測試步驟。TFS 2015年的Visual Studio測試測試組件的多條路徑

這些路徑各自獨立工作,但與分號放在一起時出現錯誤:「給定路徑的格式不支持。」 $(build.sourcesDirectory)\ v7.25_Core ** \ MySystems.Xmts.Test \ bin ** \ MySystems.Xmts.Test.dll; $(build.sourcesDirectory)\ v7.25_Core ** \ MySystems.Xmts.WinForms.Test \ bin ** \ MySystems.Xmts.WinForms.Test.dll

再次,每個工作單獨。再加上一個分號他們應該一起工作,但我得到一個錯誤。我錯過了什麼?

文件說,它應該工作:https://www.visualstudio.com/en-us/docs/build/steps/test/visual-studio-test

這是關於關注的通配符也:https://blogs.infosupport.com/tfs2015-build-tasks-the-wildcard-format-explained/#comment-124376

回答

0

更改$(build.sourcesDirectory)**,你會擺脫這種錯誤的:

**\v7.25_Core**\MySystems.Xmts.Test\bin**\MySystems.Xmts.Test.dll; **\v7.25_Core**\MySystems.Xmts.WinForms.Test\bin**\MySystems.Xmts.WinForms.Test.dll 
+0

我已經嘗試了另一個更早的嘗試。我再次嘗試,並得到相同的錯誤: 執行powershell腳本:C:\ Build \ tasks \ VSTest \ 1.0.30 \ VSTest.ps1 ## ** [錯誤]不支持給定路徑的格式。 * ## [警告]找不到與模式匹配的測試程序集:'F:\ Builds \ _work \ 1 \ s \ v7.25_Core \ ** \ MySystems.Xmts.Test \ bin \ ** \ My.Xmts.Test .dll文件; F:\構建\ _work \ 1 \ S \ v7.25_Core \ ** \ MySystems.Xmts.WinForms.Test \ BIN \ ** \ MySystems.Xmts.WinForms.Test.dll」。 – alivelee

+0

我已經測試過TFS 2015.3。當在Visual Studio Test步驟中使用$(build.sourcesDirectory)時,我會得到「未找到提供的測試源文件」錯誤。但是,如果我使用**而不是$(build.sourcesDirectory),如上所述,我會得到一個成功的結果。 –

2

它看起來像這是一個已知的錯誤,並通過TFS2015 UPDATE 3解決。 「如果以分號分隔2個DLL的完整路徑,則VsTest任務失敗。」

+0

請爲此已知錯誤添加源代碼。 –

相關問題