locked
Issue with some test cases

    Question

  • Hi,

    Our product makes API calls to TFS. 

    1. we query a test suite to get a list of test cases with TFS using this 

    http://instance/tfs/PitCollection/MattyTestProject/_apis/test/Plans/169/Suites/170/testcases


    2. We parse the returned JSon stripping out the test case id's, one of these id's is 4036

    3. We make a call to the api http://lobvi02-i203126:8080/tfs/PitCollection/_apis/wit/workItems?ids=4036,670808, ......,$expand=all&api-version=1.0

    4. This produces the error "TF401232: Work item 4036 does not exist, or you do not have permissions to read it"

    5. When we view the test suite in the web browser no Test Case with Id 4036 exists

    If workitem 4036 doesn't exist or the user hasn't got permission to read this workitem why is it being returned by the server when we make the API call to get test cases?



    Monday, November 20, 2017 5:39 PM

All replies

  • Hi,

    Your issue is related to TFS, I will move it to TFS forum.


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, November 22, 2017 8:05 AM
    Moderator
  • Can you share the json returned in Step 1?
    Monday, November 27, 2017 2:47 AM
  • Hi,

    Do you use the same account when call REST API to get that test case work item?


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, November 27, 2017 9:18 AM
    Moderator
  • {"value":[{"testCase":{"id":"4036","name":null,"type":null,"url":"https://tfs.gm.com/tfs/GBRD/_apis/wit/workItems/4036","webUrl":"https://tfs.gm.com/tfs/web/wi.aspx?pcguid=daa6d28d-9e47-4350-8add-be19835e83bb&id=4036"},"pointAssignments":[{"configuration":{"id":"212","name":"Windows 8"},"tester":{"id":"6559e6a5-df43-416a-8162-1dc91768600c","displayName":"Jorge Aguero","uniqueName":"NAM\\ZZ80DF","url":"https://tfs.gm.com/tfs/GBRD/_apis/Identities/6559e6a5-df43-416a-8162-1dc91768600c","imageUrl":"https://tfs.gm.com/tfs/GBRD/_api/_common/identityImage?id=6559e6a5-df43-416a-8162-1dc91768600c"}}]},{"testCase":{"id":"958867","name":null,"type":null,"url":"https://tfs.gm.com/tfs/GBRD/_apis/wit/workItems/958867","webUrl":"https://tfs.gm.com/tfs/web/wi.aspx?pcguid=daa6d28d-9e47-4350-8add-be19835e83bb&id=958867"},"pointAssignments":[{"configuration":{"id":"212","name":"Windows 8"},"tester":null}]},{"testCase":{"id":"958868","name":null,"type":null,"url":"https://tfs.gm.com/tfs/GBRD/_apis/wit/workItems/958868","webUrl":"https://tfs.gm.com/tfs/web/wi.aspx?pcguid=daa6d28d-9e47-4350-8add-be19835e83bb&id=958868"},"pointAssignments":[{"configuration":{"id":"212","name":"Windows 8"},"tester":null}]},{"testCase":{"id":"958869","name":null,"type":null,"url":"https://tfs.gm.com/tfs/GBRD/_apis/wit/workItems/958869","webUrl":"https://tfs.gm.com/tfs/web/wi.aspx?pcguid=daa6d28d-9e47-4350-8add-be19835e83bb&id=958869"},"pointAssignments":[{"configuration":{"id":"212","name":"Windows 8"},"tester":null}]},{"testCase":{"id":"958870","name":null,"type":null,"url":"https://tfs.gm.com/tfs/GBRD/_apis/wit/workItems/958870","webUrl":"https://tfs.gm.com/tfs/web/wi.aspx?pcguid=daa6d28d-9e47-4350-8add-be19835e83bb&id=958870"},"pointAssignments":[{"configuration":{"id":"212","name":"Windows 8"},"tester":null}]},{"testCase":{"id":"958871","name":null,"type":null,"url":"https://tfs.gm.com/tfs/GBRD/_apis/wit/workItems/958871","webUrl":"https://tfs.gm.com/tfs/web/wi.aspx?pcguid=daa6d28d-9e47-4350-8add-be19835e83bb&id=958871"},"pointAssignments":[{"configuration":{"id":"212","name":"Windows 8"},"tester":null}]},{"testCase":{"id":"958872","name":null,"type":null,"url":"https://tfs.gm.com/tfs/GBRD/_apis/wit/workItems/958872","webUrl":"https://tfs.gm.com/tfs/web/wi.aspx?pcguid=daa6d28d-9e47-4350-8add-be19835e83bb&id=958872"},"pointAssignments":[{"configuration":{"id":"212","name":"Windows 8"},"tester":null}]},{"testCase":{"id":"958873","name":null,"type":null,"url":"https://tfs.gm.com/tfs/GBRD/_apis/wit/workItems/958873","webUrl":"https://tfs.gm.com/tfs/web/wi.aspx?pcguid=daa6d28d-9e47-4350-8add-be19835e83bb&id=958873"},"pointAssignments":[{"configuration":{"id":"212","name":"Windows 8"},"tester":null}]},{"testCase":{"id":"958874","name":null,"type":null,"url":"https://tfs.gm.com/tfs/GBRD/_apis/wit/workItems/958874","webUrl":"https://tfs.gm.com/tfs/web/wi.aspx?pcguid=daa6d28d-9e47-4350-8add-be19835e83bb&id=958874"},"pointAssignments":[{"configuration":{"id":"212","name":"Windows 8"},"tester":null}]},{"testCase":{"id":"958875","name":null,"type":null,"url":"https://tfs.gm.com/tfs/GBRD/_apis/wit/workItems/958875","webUrl":"https://tfs.gm.com/tfs/web/wi.aspx?pcguid=daa6d28d-9e47-4350-8add-be19835e83bb&id=958875"},"pointAssignments":[{"configuration":{"id":"212","name":"Windows 8"},"tester":null}]},{"testCase":{"id":"958876","name":null,"type":null,"url":"https://tfs.gm.com/tfs/GBRD/_apis/wit/workItems/958876","webUrl":"https://tfs.gm.com/tfs/web/wi.aspx?pcguid=daa6d28d-9e47-4350-8add-be19835e83bb&id=958876"},"pointAssignments":[{"configuration":{"id":"212","name":"Windows 8"},"tester":null}]},{"testCase":{"id":"958877","name":null,"type":null,"url":"https://tfs.gm.com/tfs/GBRD/_apis/wit/workItems/958877","webUrl":"https://tfs.gm.com/tfs/web/wi.aspx?pcguid=daa6d28d-9e47-4350-8add-be19835e83bb&id=958877"},"pointAssignments":[{"configuration":{"id":"212","name":"Windows 8"},"tester":null}]},{"testCase":{"id":"958878","name":null,"type":null,"url":"https://tfs.gm.com/tfs/GBRD/_apis/wit/workItems/958878","webUrl":"https://tfs.gm.com/tfs/web/wi.aspx?pcguid=daa6d28d-9e47-4350-8add-be19835e83bb&id=958878"},"pointAssignments":[{"configuration":{"id":"212","name":"Windows 8"},"tester":null}]},{"testCase":{"id":"958879","name":null,"type":null,"url":"https://tfs.gm.com/tfs/GBRD/_apis/wit/workItems/958879","webUrl":"https://tfs.gm.com/tfs/web/wi.aspx?pcguid=daa6d28d-9e47-4350-8add-be19835e83bb&id=958879"},"pointAssignments":[{"configuration":{"id":"212","name":"Windows 8"},"tester":null}]},{"testCase":{"id":"958880","name":null,"type":null,"url":"https://tfs.gm.com/tfs/GBRD/_apis/wit/workItems/958880","webUrl":"https://tfs.gm.com/tfs/web/wi.aspx?pcguid=daa6d28d-9e47-4350-8add-be19835e83bb&id=958880"},"pointAssignments":[{"configuration":{"id":"212","name":"Windows 8"},"tester":null}]},{"testCase":{"id":"958881","name":null,"type":null,"url":"https://tfs.gm.com/tfs/GBRD/_apis/wit/workItems/958881","webUrl":"https://tfs.gm.com/tfs/web/wi.aspx?pcguid=daa6d28d-9e47-4350-8add-be19835e83bb&id=958881"},"pointAssignments":[{"configuration":{"id":"212","name":"Windows 8"},"tester":null}]},{"testCase":{"id":"958882","name":null,"type":null,"url":"https://tfs.gm.com/tfs/GBRD/_apis/wit/workItems/958882","webUrl":"https://tfs.gm.com/tfs/web/wi.aspx?pcguid=daa6d28d-9e47-4350-8add-be19835e83bb&id=958882"},"pointAssignments":[{"configuration":{"id":"212","name":"Windows 8"},"tester":null}]},{"testCase":{"id":"958883","name":null,"type":null,"url":"https://tfs.gm.com/tfs/GBRD/_apis/wit/workItems/958883","webUrl":"https://tfs.gm.com/tfs/web/wi.aspx?pcguid=daa6d28d-9e47-4350-8add-be19835e83bb&id=958883"},"pointAssignments":[{"configuration":{"id":"212","name":"Windows 8"},"tester":null}]},{"testCase":{"id":"958884","name":null,"type":null,"url":"https://tfs.gm.com/tfs/GBRD/_apis/wit/workItems/958884","webUrl":"https://tfs.gm.com/tfs/web/wi.aspx?pcguid=daa6d28d-9e47-4350-8add-be19835e83bb&id=958884"},"pointAssignments":[{"configuration":{"id":"212","name":"Windows 8"},"tester":null}]},{"testCase":{"id":"958885","name":null,"type":null,"url":"https://tfs.gm.com/tfs/GBRD/_apis/wit/workItems/958885","webUrl":"https://tfs.gm.com/tfs/web/wi.aspx?pcguid=daa6d28d-9e47-4350-8add-be19835e83bb&id=958885"},"pointAssignments":[{"configuration":{"id":"212","name":"Windows 8"},"tester":null}]},{"testCase":{"id":"958886","name":null,"type":null,"url":"https://tfs.gm.com/tfs/GBRD/_apis/wit/workItems/958886","webUrl":"https://tfs.gm.com/tfs/web/wi.aspx?pcguid=daa6d28d-9e47-4350-8add-be19835e83bb&id=958886"},"pointAssignments":[{"configuration":{"id":"212","name":"Windows 8"},"tester":null}]},{"testCase":{"id":"958887","name":null,"type":null,"url":"https://tfs.gm.com/tfs/GBRD/_apis/wit/workItems/958887","webUrl":"https://tfs.gm.com/tfs/web/wi.aspx?pcguid=daa6d28d-9e47-4350-8add-be19835e83bb&id=958887"},"pointAssignments":[{"configuration":{"id":"212","name":"Windows 8"},"tester":null}]},{"testCase":{"id":"958888","name":null,"type":null,"url":"https://tfs.gm.com/tfs/GBRD/_apis/wit/workItems/958888","webUrl":"https://tfs.gm.com/tfs/web/wi.aspx?pcguid=daa6d28d-9e47-4350-8add-be19835e83bb&id=958888"},"pointAssignments":[{"configuration":{"id":"212","name":"Windows 8"},"tester":null}]},{"testCase":{"id":"958889","name":null,"type":null,"url":"https://tfs.gm.com/tfs/GBRD/_apis/wit/workItems/958889","webUrl":"https://tfs.gm.com/tfs/web/wi.aspx?pcguid=daa6d28d-9e47-4350-8add-be19835e83bb&id=958889"},"pointAssignments":[{"configuration":{"id":"212","name":"Windows 8"},"tester":null}]},{"testCase":{"id":"958890","name":null,"type":null,"url":"https://tfs.gm.com/tfs/GBRD/_apis/wit/workItems/958890","webUrl":"https://tfs.gm.com/tfs/web/wi.aspx?pcguid=daa6d28d-9e47-4350-8add-be19835e83bb&id=958890"},"pointAssignments":[{"configuration":{"id":"212","name":"Windows 8"},"tester":null}]},{"testCase":{"id":"958891","name":null,"type":null,"url":"https://tfs.gm.com/tfs/GBRD/_apis/wit/workItems/958891","webUrl":"https://tfs.gm.com/tfs/web/wi.aspx?pcguid=daa6d28d-9e47-4350-8add-be19835e83bb&id=958891"},"pointAssignments":[{"configuration":{"id":"212","name":"Windows 8"},"tester":null}]},{"testCase":{"id":"958892","name":null,"type":null,"url":"https://tfs.gm.com/tfs/GBRD/_apis/wit/workItems/958892","webUrl":"https://tfs.gm.com/tfs/web/wi.aspx?pcguid=daa6d28d-9e47-4350-8add-be19835e83bb&id=958892"},"pointAssignments":[{"configuration":{"id":"212","name":"Windows 8"},"tester":null}]},{"testCase":{"id":"958893","name":null,"type":null,"url":"https://tfs.gm.com/tfs/GBRD/_apis/wit/workItems/958893","webUrl":"https://tfs.gm.com/tfs/web/wi.aspx?pcguid=daa6d28d-9e47-4350-8add-be19835e83bb&id=958893"},"pointAssignments":[{"configuration":{"id":"212","name":"Windows 8"},"tester":null}]},{"testCase":{"id":"958894","name":null,"type":null,"url":"https://tfs.gm.com/tfs/GBRD/_apis/wit/workItems/958894","webUrl":"https://tfs.gm.com/tfs/web/wi.aspx?pcguid=daa6d28d-9e47-4350-8add-be19835e83bb&id=958894"},"pointAssignments":[{"configuration":{"id":"212","name":"Windows 8"},"tester":null}]},{"testCase":{"id":"958895","name":null,"type":null,"url":"https://tfs.gm.com/tfs/GBRD/_apis/wit/workItems/958895","webUrl":"https://tfs.gm.com/tfs/web/wi.aspx?pcguid=daa6d28d-9e47-4350-8add-be19835e83bb&id=958895"},"pointAssignments":[{"configuration":{"id":"212","name":"Windows 8"},"tester":null}]}],"count":30}
    Monday, December 4, 2017 2:51 PM
  • The same account as what?

    I don't understand this question

    Monday, December 4, 2017 2:53 PM
  • The aaccount that makes the call in step 1 and step 3 is the same account
    Monday, December 4, 2017 3:10 PM