none
Collection engine threw exception

    Question

  • We have a large solution (~220 projects) and when attempting to generate Unit Test Coverage on the entire project we get the error below. If we split up the unit tests, Unit Test coverage is calculated without errors. This error is received on both our Build Machine and in the local build system.

    Details:

    VS2010 SP1

    C#


    Test Run Error.

    Code coverage collection error: Collection engine threw exception:

    Error VSP0014 : True.

    The test run execution on that machine cannot continue.

    Waiting to publish...

    Publishing results of test run labbuild@BUILDUI-PC 2012-04-23 12:05:54_Any CPU_Debug to http://10.XXX.XXX.XXX:8080/tfs/IVIS...

    Monday, April 23, 2012 6:20 PM

All replies

  • Hi Scooter,

    Thank you for posting in the MSDN forum.

    Which way were you using to get the coverage, from the IDE or the command line?

    If use one of the two way, how about using the second way? See Code Coverage Basics with Visual Studio Team System.

    Did you create many unit tests and run them at the same time? Check your Test Results window, whether all unit tests’ results are passed. Did you get other results like “time-outs or aborted”? As you said that there are plenty of projects in your solution, if you create many unit tests and run them at the same time, I’m afraid that the time limits for running tests could impact the results. For more detailed information, see How to: Set Time Limits for Running Tests.

    If you have many unit tests, for example, 20 unit tests, how about running 5 or 10 unit tests at the same time? Does it have the same issue?

    Whether it is the whole error message? If not, could you share the error message detailed?

    In addition, it seems that you are using the TFS-build, am I right? If possible, I suggest you run all the tests without the TFS, so we can make sure that it is not related to the TFS like this thread.

    If possible, you could turn on vstesthost logging to get more information. Please refer:

    http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/5b549546-b237-46be-8bcf-72abdf1da41a. Hope it could help.

    If there's any concern, please feel free to let me know.

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, April 25, 2012 2:34 AM
    Moderator
  • Hi Jack,

    The issue is not unit test. They are running fine. It is the code coverage. As I said, we have many projects (~220), if I configure to run code coverage on 1/2 of them, all units tests are executed and we get back code coverage results. If I configure to run all or even 2/3 the unit tests are executed but the code coverage collection at the end fails with this error:

    This is for a code coverage run on a local system, not the build server:

          <RunInfo computerName="IVISPDMD003" outcome="Error" timestamp="2012-04-23T15:00:10.9543764-04:00">
            <Text>Code coverage collection error: Collection engine threw exception:
    Error VSP0014 : True.
    The test run execution on that machine cannot continue.</Text>
          </RunInfo>
        </RunInfos>
        <ResultFiles>
          <ResultFile path="IVISPDMD003\data.coverage" />
        </ResultFiles>

    A successful run for code coverage reports the following:

        <ResultFiles>
          <ResultFile path="IVISPDMD003\data.coverage" />
        </ResultFiles>

    Do you know the circumstances that would generate this error?

    Do you know what error VSP0014 : True means?

    Thanks for your help.

    Scott

    Wednesday, April 25, 2012 10:29 PM
  • Hi Scott,

    Glad to receive your reply.

    Actually, I didn’t meet this issue before. As you said that if all unit tests are passed, so we could make sure it is not the test issue.

    If you could get all tests’ code coverage results when you run them independently, but it has this issue when you want to get all the coverage results at the same time. I’m afraid that maybe it is related to all the assemblies, since this solution are so hug. If possible, you could check it in another PC, if it has the same issue, so we could make sure that it is not the VS issue.

    My suggestion is that you could configure to run few of them (as you said, like ½ of them), of course, I know it is not a good solution, but if it still has this issue when you run them with another PC, I suggest you submit this feedback to Microsoft Connect feedback portal: http://connect.microsoft.com, Microsoft engineers will evaluate them seriously. Thanks for your understanding.

    Have a nice day,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, April 26, 2012 4:32 AM
    Moderator
  • Yes, as I wrote before this happens on our Build Server and on any of our developers systems that attempt to run unit tests and code coverage on all of our projects.

    How come it is not possible to find out what

    Error VSP0014 : True.

    Means?

    In the good old days you could do an Error Lookup and at least sometimes get a clue what was going on...Perhaps I am dating myself.

    In any case we have MSDN and have an open ticket on this. Just trying to help the poor souls out their wthout those resources having similar issues.

    Thanks for your replies and help.

    Thursday, April 26, 2012 2:48 PM
  • Hi Scott,

    Sorry for my reply no help.

    About this issue, I have done some research, but we didn’t get more useful information. If possible, you could create the unit tests in another large solution, and check whether it could work, so we could make sure that whether it is related to this specific solution.

    Since it is hard for me to repro this issue, so if no help, I really suggest this feedback to Microsoft Connect feedback portal. Of course, if possible, you could send a sample to jackzhai at Hotmail dot com. I will try to check it. Thanks for your understanding.J

    Sincerely,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us

    Friday, April 27, 2012 3:22 AM
    Moderator