locked
A query with passed test cases and who completed the test RRS feed

  • Question

  • Hi!

    I'm new to VSTFS and have just dug into query-making. And I'm trying to produce a query to list Passed Test cases within a Test Plan with the information of who ran the test to passed and when it was done. But it seems easier said than done unfortunately.

    The columns I want are:

    Test Id, Title, Run by, Run Date (the day the test was run to passed)

    The selection should be:

    Test Plan = [name/id of the test plan]
    Outcome = Passed

     I've been able to locate ID and Title so far but nothing which corresponds to test plan, outcome, run by or run date.
    Is there anywhere I can see the names of all the terms. Like a database description?




    Tuesday, July 8, 2014 12:01 PM

All replies

  • Hi Linda-Sthlm,

    I'd like to know what you have done and the details about your scenario to create such query, and it would be better if you can also post a screenshot. Please clarify whether you want to create a query in Team web access or create a sql query.

    If you're working with TFS, you can check the histories of test cases to get the information about tester/owner by clicking them directly. And you can also manage test plans/suites by Microsoft Test Manager by connecting it to your team project. Please elaborate more details if it's not what you want.

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, July 9, 2014 6:27 AM
    Moderator
  • Hello Charles!

    Unfortunately the Screenshot function is not working at the moment, I just get an error message. But what I want to do is to create a very basic and simple query, only that I'm new at this and don't have anyone available to ask. My main problem is actually not how the query funtion works, but the names of certain fields in the database.

    What I do is:

    I enter _Wiew Queries_ (under activities in home at VSTFS). I select New, Query.
    Then I create a queary like:

    Work Item Type = "Test Case"

    _AND_ Test Plan =< Name of my test plan> as created under Properties in Test Centre of MS Test Manager 2013. Only that it doesn't seem to be called Test Plan or anything remotely similar. But we use Test Plans and Test Suites to hold our tests together.

    _AND_ Outcome = "Passed" (Only that this field is apparently NOT called Outcome or Result, the way you see it in a test suite )

    ************************

    And I want to display the test cases I'm getting a hit of, showing the columns:

    Test Case Id, Title, Created Date, Run By


    Where 'Created Date' is the date when the test was runned to PASSED
    And 'Run By' is the name of the tester who ran the test to PASSED

    And those two last fields I cannot find the names of either.

    So what I really need is to know WHERE all the real names of the fields are. Is there a place or a function (like a ctrl+hover) where I can see those.

    Hope this clearify my problem.

    Wednesday, July 9, 2014 8:19 AM
  • Hi Linda-Sthlm,

    Thanks for your clarification. My understanding is that you want to create a sql query to get the data but not sure the fields that should be used in your query. You can get it from the table of "dbo.tbl_TestResult", and the fields of last two are “CreationDate” and "RunBy". Please have a check and elaborate more details if it's not what you meant.

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, July 10, 2014 10:28 AM
    Moderator
  • Hi Charles!

    Thanks for your time, but bear with me, as you seem to be several steps ahead of me now. First of all, I'm new to this tool, and since I haven't found any help, manual or FAQ anywhere, I have to ask in the forum, even about the very basics.

    ---------------------------------------

    First of all:

    I already have Work Item Type = "Test Case" in my query and so far it works fine, but I also need to add these selections:


    _AND_ Test Plan =< Name of my test plan> --- which should be the name of the test plane created under Properties in Test Centre of MS Test Manager 2013. It doesn't seem to have any other identification than its name. And I don't know what TESTPLAN field is called in the data base!

    _AND_ Outcome = "Passed"---- I don't know what OUTCOME field is called in the database. When I hover it or ctrl+hover it in the browser, it's still called OUTCOME and when I right-click it says nothing, so it's impossible to discover its real name in any intuitive way.


    So I can't put these selections into the query because then I get these error messages:

    TF51005: The query references a field that does not exist. The error is caused by test plan.
    TF51005: The query references a field that does not exist. The error is caused by Outcome.

    So I need to replace these assumed names with the real names in the query to get it to work.

    --------------------------------------------

    Secondary I need the two columns for creation date and Run by, so


    1. How do I get hold of the dbo.tbl_TestResult?
    and then
    2. How do I add CreationDate and RunBy to Column Options?


    I cannot type in the columns options window, it only let me select from dropdowns. And in the dropdown I cannot find these names you're reffering to, so there's obviously something more/else I have to do to enable them to be used.

    -----------------

    Finally:

    Where/how can I find the real names of fields like OUTCOME?

    __________________________edit______________________________

    Down below is a link to an image I made which may clearify what I'm trying to do, please remove the spaces, as this forum apparently not allows regular linking

    https:  //  dl.dropboxusercontent.com  /  u  /  54562703  /  the%20list%20I%20want%20to%20make.png


    • Edited by Linda-Sthlm Thursday, July 10, 2014 11:34 AM
    Thursday, July 10, 2014 11:17 AM
  • Hello out there!!

    Can anyone please give me a hand with this really basic question?

    Or tell me where I should look for answers?

    Tuesday, July 15, 2014 8:54 AM
  • Hi Linda-Sthlm,

    Thanks for the screenshot, my understand is that your want to create such query by query editor in team web access. Please clarify if it's not your scenario. I supposed you want to get the owners who run the test cases passed in a specific test plan. And I think you can get it by test result of a test plan after running in Microsoft Test Manager.

    Team web access query editor is for work item related query, you cannot get it by work item query since there no field for outcome in the query editor. However, you can see the passed test cases of a test plan in Test tab of team web access, see the screenshot as below:

    If you use Microsoft Test Manager, you can also open a new thread in MTM forum if you have any other concerns about test.

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, July 17, 2014 7:16 AM
    Moderator
  • Yes, now we're on the same track!

    What's in that window is something similar to what I want, only that I aditionally need the name of the tester who ran the test to passed as one column and the date the test was run to passed to test as another column.

    Then I want all the test cases in the test plane in the same list

    Finally I want to extract that list into an excel sheet to be able to distribute it to the various stake holders.

    So how do I do that, if I cannot use query maker for it?

    ________________edit_____________________

    I managed to figure out how to transfer this to excel (oldschool copy/paste), the only thing I need help with now is reaching the columns for  the name of the tester who ran the test to passed and date the test was run to passed


    Thursday, July 17, 2014 8:10 AM
  • Hi Linda-Sthlm,

    As I mentioned above, you cannot get it by work item query since there no field for outcome in the query editor. Maybe you can get the column details by accessing the table of "dbo_tbl_TestResult" for the team project collection.


    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, August 6, 2014 9:02 AM
    Moderator
  • As I asked earlier, where do I find the 'dbo_tbl_TestResult'?

    And if I cannot use query editor for this kind of list extraction, what do I do instead? Can I edit the column structure in the Test Suite frame to add this desired information?

    Monday, August 11, 2014 10:52 AM
  • Hi Linda-Sthlm,

    The table is in the database of your team project collection. And work item query editor is not fit for your specific requirement. It's recommend to use Microsoft Test Manager to achive your goal.

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, August 14, 2014 2:48 AM
    Moderator
  • > It's recommend to use Microsoft Test Manager to achive your goal.

    How do I do it from there then? Is there something similar to the query editor in the MTM? Like a report engine?

    (You'll have to excuse my ignorance but I'm new to this, and I have yet to find even the most basic FAQ for these things. I've come to realize after a few days of trial and error, that the query maker is very basic and limited, so I really need a more powerful tool, to be able to produce the statistics I need in a more convenient way than screen shots and manual additions, which is too time consuming and prone to human erroring.)

    Thursday, August 14, 2014 11:11 AM
  • Bump!
    Wednesday, August 27, 2014 6:19 AM
  • Anyone?
    Wednesday, September 10, 2014 1:18 PM