1

I tried to push the test result (*.trx) to MTM by command line. I used msttest /publish or tcm run /publish. With both I can't get the correct project path, anyone know how to find the path?

Attempted:

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

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

Tried to remove mtms:// and just used https://companyName.visualstatudio.com:

The following team project cannot be found:

How do I find out what is the correct project path?

Quality Catalyst
  • 6,531
  • 8
  • 38
  • 62
Felix T
  • 11
  • 1
  • Did you figure out your issue? You should include your collection in the url such as`/collection: https://companyName.visualstatudio.com:443/YourCollection` .It's a **collection level url** not TFS server url. And also simply use the teamproject name for /teamproject option, such as `/teamproject:"MyProject"` – PatrickLu-MSFT Jan 05 '17 at 03:47

1 Answers1

0

The /publish command is used to associate test runs/results with builds. MTM is displaying test results that are associated with test plans/suites which are somewhat independent of builds.

/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

Using this command the results will successfully published to build.The published result is viewed in your build summary, but they don't appear in MTM. There is no way to view the result in MTM. Please refer this similar question.

TCM is a command line interface to running tests, similar to mstest, but it runs the tests through the infrastructure you set up in MTM. To publish .trx files to MTM/TFS, you're going to have to use tcm.exe not mstest.exe to get what you're after. Sample command as below:

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>>

Note: please double check your server url is suitable.

PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62