none
How do I query for TFS Test Results in Excel

    Question

  • We are currently using just the TFS build system to build and run unit tests.  We then use MSTest to run all of our integration tests and publish the test results back to the TFS server.  My question is how to get those test results into something like Excel that we can do pivots and such on?

    We do not make use of "test case" work items, test plans, test environment/configurations, or any of that sort of TFS functionality at the moment.  This is the first baby step in tracking our results (both trending and down to the individual test detail as needed).

    Problem is, I cannot find any examples which are not frustratingly requiring all that other TFS infrastructure (test plans, cases, runs, labs, configurations, and so on).  Please tell me there is a way to get this information into a queryable form in Excel -- this is what our management is used to at the moment in the long slog to understanding TFS more.

    Wednesday, November 09, 2011 7:55 PM

Answers

All replies

  • Hi Tac,

    Thank you for your post.

    According to your description of the issue, the issue you are experiencing is report test result in excal. If I have misunderstood anything, please free feel to let me know.
    Would you please make following steps to have a try?
    1. In Excel, connect tfs_analysis cube as following screen shot.

    2. In the right of excel window, there is PivotTable Field List, Test field is there as following screen shot.

    I hope this information will help resolve this issue.

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

    Best Regards,


    Lily Wu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, November 11, 2011 5:50 AM
    Moderator
  • It does and it doesn't.

    The cube only gives a sub set of information versus what you can query on from the reporting service's report builder. I need things like the error messages, the test that was run, its priority, and so on. This can be obtained from the report builder queries, but that's not where we want to pivot the data at this time.

    Note: We do not at this time track test cases, test plans, or use any of the "lab" functionality supported by TFS. We're just using source control, builds, and unit testing, and want to expand to integration testing. We already have a process that deploys builds to a variety of environments then triggers off MSTest to run these integration tests. Resulting TRX files are then imported into TFS. It's getting the data out of TFS which is proving difficult...

    The charts I want are:

    1. Project (think .csproj) pass rates over time, aggregated in a variety of ways
    2. Top 10 failures for a particular aggregated test run
    3. Delta pass rate versus previous aggregated test run, which is then plotted over time to show pass rate "noise" build over build

    All of this can be obtained by the archive of TRX files we've saved over the last 6 months if we were to parse them ourselves and put them in our own SQL database. However, we're investigating the transition to TFS using more than just source control and builds.

    • Edited by Tac Elf Monday, November 14, 2011 6:28 PM Bad formatting
    Monday, November 14, 2011 6:26 PM
  • Hi Tac,

     

    As far as i know, in current release, there is no function support this.

     

    For this scenario, I suggest you submit it as a suggestion to Visual Studio UserVoice site. Microsoft engineers will evaluate them seriously.

     

    Best Regards,


    Lily Wu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, November 15, 2011 9:28 AM
    Moderator