-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help needed in understanding how to use TFSHTTPClient #84
Comments
@LakshmiAntin, this line is used to create a Make sure you have imported the library first: If that does not help, please provide a complete code example we can use to reproduce your error. |
I want to upload test case steps using send_patch method. I am able to do it through postman, but I am not sure if I should use this line( new_task = WorkItem(client, new_task_raw) ) to upload test case steps. Please find my code below: import requests username = 'username' data = [] test_patch = client.rest_client.send_patch("https://TFSLINK:8080/tfs/Collection name/_apis/wit/workitems/XXXXX",data,headers = headers,payload = payload,project = project) XXXXX is workitem id for which I would like to add test case steps. |
PATCH-requests are used to modify existing work items. If your task at hand is to modify already existing test cases, you do not need to initialize them via raw data. If you want to further modify your test case, init it via Let me know if that helps. |
{ I get the above response when I use send_patch request. I can see test case steps are returned back in the response, however it is not shown on the Web interface of TFS. |
'Microsoft.VSTS.TCM.Steps': Above steps xml representation was changed by browser I guess. Adding it again for clarity. |
I will ask just in case: have you tried updating the web page after recieving positive response from patch? Also try to get test case via |
Yes. I have tried updating the web page after receiving positive response from patch. But steps were not shown even after a successful patch response. I tried Thanks |
Try |
No. The data returned by Thanks. |
Another just-in-case-check: make sure the field you see in web actually corresponds to Try this algorithm:
|
I tried the above algorithm and steps still do not appear on web. |
I really should have mentioned it sooner. |
I used personal_access_token and still test steps did not show up on web. |
The very last advice i can give you will be a generic one:
|
Is project ID required for a PATCH request like it is required for creating work items mentioned in #77 ? |
Yes it is required. |
No it still did not help. However, after calling for the same workitem XXXXX |
Could you share the test case WITD? |
Does the above URL needs to have a path project/projectId/_apis/wit/workitems/XXXXX ?`` |
Based on REST API doc, update URL can have both collection and project specified but only collection is required. |
Hi,
Can someone explain the following line below mentioned in Advanced usage example? I am getting WorkItem undefined error.
new_task = WorkItem(client, new_task_raw)
The text was updated successfully, but these errors were encountered: