2017-01-04 47 views
1

我試圖通過命令行將測試結果(* .trx)推送到MTM。我用msttest /publishtcm run /publish。既然我無法獲得正確的項目路徑,任何人都知道如何找到路徑?無法找到mstest.exe/tcm.exe的項目路徑

嘗試:

/collection:"mtms://companyName.visualstudio.com:443" 
    /teamproject:"MyProject/Testing/testplan" 

Error: TF249051: No URL can be found that corresponds to the following server name:

試圖刪除mtms://,只用於https://companyName.visualstatudio.com

The following team project cannot be found:

我如何找出什麼是正確的項目路徑?

+0

你知道你的問題嗎?你應該包括你的收藏在URL如'/收集:https://companyName.visualstatudio.com:443/YourCollection'。這是一個**集合級別的網址**而不是TFS服務器網址。並且簡單地使用teamproject名稱作爲/ teamproject選項,比如'/ teamproject:「MyProject」' –

回答

0

/publish命令用於關聯測試運行/結果與構建。 MTM正在顯示與測試計劃/套件相關的測試結果,這些測試計劃/套件與構建有些獨立。

/publish: [ server name]

Use the /publish option to publish test data to the database for the team project collection associated with the project's Team Foundation Server. When you use the /publish option, you must correctly specify the name of the Team Foundation Server. The correct format depends on whether the Team Foundation Server has been registered on the client computer, as described here: Command-Line options for publishing test results

使用此命令的結果將成功發佈到build.The在構建摘要觀察公佈的結果,但他們不會出現在MTM。無法在MTM中查看結果。請參考this類似的問題。

TCM是運行測試的命令行界面,類似於mstest,但它通過您在MTM中設置的基礎架構運行測試。要將.trx文件發佈到MTM/TFS,您將不得不使用tcm.exe而不是mstest.exe來獲取您的內容。示例命令如下:

tcm run /publish /suiteid:XXXX /configid:X /resultowner:"ABC XYZ" /resultsfile:C:\TempResult.trx /collection:http://<<TFS URL>> /teamproject:"My Project" /runowner:"ABC XYZ" /build:<<Build Number>> /builddefinition:<<Build Definition Name>> 

注:請仔細檢查您的服務器的URL是合適的。

+0

嗨Felix,這個解決方案能解決你的問題嗎? –