tcm run /export throws error "The process could not download all the files successfully. Error: Unable to read data from the transport connection: The connection was closed" RRS feed

  • Question

  • I execute around 35 coded ui tests in MTM through tcm /run command. And after the run completes, using the runid, I call tcm export to export all my test results to a trx file using the below command thats present in a batch file.

    tcm run /export /id:%testrunid%




    On running export, it says "Starting Export", but then after one or two minutes, I see the following error: "The process could not download all the files successfully. Error: Unable to read data from the transport connection: The connection was closed"

    When I open the trx fle, I see only first few tests exported. However, when I open th results of the test trough MTM, I can see results of all 35 tests. Can someone please help?

    Or is there a different way to export results to trx file instead of tcm? I know mstest does that, but I believe I could do it only as a part of an MSTest run.

    Thanks in advance for all help!

    • Edited by itsme255 Friday, October 5, 2012 1:32 PM
    Friday, October 5, 2012 12:55 PM

All replies

  • Hi itsme,

    Thank you for your post.

    According to your description of the issue, hope you can provide following information to help narrow down the issue:
    1. Run tcm run /export command seperately for each test run, do you the saem issue?
    2. What's the version of your OS? If you are using Windows server 2008 R2, please try to apply this hotfix
    3. Is there any detail error log in windows event viewer?
    4. Do other user experience the same issue when run the same command?

    If anything is unclear, please free feel to let me know.


    Lily Wu [MSFT]
    MSDN Community Support | Feedback to us

    Monday, October 8, 2012 6:14 AM
  • Hi Itsme,

    We have done bunch of changes in the way we handle trx files in TCM/MTM. Can you please share the following details?

    1. Which version of MTM, TCM.exe and Tfs server are you using?

    2. Are you running into the download problem always or it occurs once in a while?

    3. If you try opening the attachments visible in the MTM test run/results, are you able to open them or they also fail with the connection closed problem?


    Aseem Bansal

    Thursday, November 22, 2012 12:01 PM
  • Hi Aseem:

    1. I use VS/MTM 2010.

    2. I used to run into this problem 95% of the time, and as a temporary workaround, all I do is wait for 500 Secs after the test run completes, and then do the export. I dont see this problem occuring ever since I used the wait option.

    3. When I try to open the *.tr_ attachment in MTM, MTM crashes. However, I am able to save the *.tr_ file into my C:\ oand view with notepad.

    Recently, I have been running into the below issue, not sure if it could be related to the one above.

    Currently, my test run has around 60 test cases. After the test run completes, I am able to see the results of all 60 cases in MTM. However, when I do a tcm export, looks like only 45 of the tests are getting exported. I would highly appreciate your help with this issue as I have no luck finding a solution for this despite lot of research.

    Thanks much

    Thursday, December 6, 2012 5:25 PM
  • Hi,

    Thanks for your reply.

    1. Can you please share the trx file which contains 45 tests and the MTM image which shows 60 tests. Also what is special about the 15 tests which are missing? You might want to put it on skydrive and paste the link in this post.

    2. Regarding MTM crash, can you please share what error are you observing when you try to open tr_ file with MTM? Do you see any errors in the application event logs for this?


    Aseem Bansal

    Friday, December 7, 2012 5:12 AM
  • 1. When I try to add a link to my Skydrive, I get this error "Body text cannot contain images or links until we are able to verify your account"

    2. MTM goes to a not responding state for a while (~15 minutes) and then when I close it, I see the "mtm.exe is not responding" dialog. Please see below the event log.

    Log Name:      Application
    Source:        Application Hang
    Date:          12/7/2012 1:54:12 PM
    Event ID:      1002
    Task Category: (101)
    Level:         Error
    Keywords:      Classic
    User:          N/A
    The program mtm.exe version 10.0.40219.1 stopped interacting with Windows and was closed. To see if more information about the problem is available, check the problem history in the Action Center control panel.
     Process ID: 2968
     Start Time: 01cdd3cf53ab5e34
     Termination Time: 81
     Application Path: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\mtm.exe
     Report Id: 63f4af84-409f-11e2-97fb-0024e84a40e4

    Event Xml:
        <Provider Name="Application Hang" />
        <EventID Qualifiers="0">1002</EventID>
        <TimeCreated SystemTime="2012-12-07T18:54:12.000000000Z" />
        <Security />
        <Data>C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\mtm.exe</Data>

    Friday, December 7, 2012 8:09 PM
  • You can send me the relevant files at aseembansal at the rate of hotmail dot com.


    Aseem Bansal

    Sunday, December 9, 2012 10:13 AM
  • Have sent the files. Thanks much, Aseem!
    Monday, December 10, 2012 4:18 PM
  • Hi itsme,

    Seems you work offline with Aseem of this issue, i hope you can share your experience in forum if the issue is fix. Or, you can mark useful post as answer. They will be very beneficial for other community members having the similar questions.


    Lily Wu
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, December 12, 2012 3:01 AM
  • Hi Itsme,

    Can you please provide more information about the TRX?

    1.  How is the TRX generated is it from running test through TCM.exe?

    2. Are there Data driven or Ordered tests in test run?

    Also can you try narrow down the problem by reducing the number of tests in test runs, to check what kind of test runs are causing this issue.



    Monday, December 24, 2012 12:47 PM