Test Suite Migration fails with 401 Unauthorized #2132
Replies: 6 comments
-
Many many Test Plans and Suits get migrated every day @georgdrobny. Its unlikely that the Set_State line is causing the 401 as it does not go back to the server. If you can post the error message with the trace that would help. |
Beta Was this translation helpful? Give feedback.
-
See the call stack in the image below. I will test it with an OOB process template. Currently the project is created with a custom process template based on Agile. |
Beta Was this translation helpful? Give feedback.
-
I looked into the code of TestSuite class and can see the following on the property State
ProcessConfigHelper.ConvertStatusToState calls into the process configuration service:
So this is calling into the ProcessConfiguration Service which does the call to Azure DevOps Services which fails. |
Beta Was this translation helpful? Give feedback.
-
I commented out this line
And then migration works. |
Beta Was this translation helpful? Give feedback.
-
I tested again today with the latest version of the tool with the same issue. It fails with 403. I don't know how this is supposed to work. It's inside the Microsoft Library, but it's not clear to me how it should work if it calls into Azure DevOps Services to validate the states in the process template. It does not call using the provided PAT, this is why I get a 403 on this. My current work around is to comment out the assignment in the code but this does not solve the issue in general. |
Beta Was this translation helpful? Give feedback.
-
I assume this line has been added in a recent version of the tool as I tested the very same migration a while ago with an older version of the tool, 12.x and it had no issue. Maybe also the code was there but the Microsoft Library did not validate the value through the process template. Reading the process template is an overkill any way. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to migrate Test Plans and Test Suites. The plan gets created with the root suite but when it tries to create the first child suite (In my case it's a static suite), the tool terminates with an error of 401 Unauthorized. After some debugging, i found the line which is causing the error:
targetSuiteChild.State = TestSuiteState.InPlanning;
This is doing a call to read the process configuration from the target project for the test suite to verify that the state is valid. This is encapsulated in the Microsoft.TeamFoundation.TestManagement.Client.TestSuite.set_State
I'm using a PAT from the Collection Admin, but I'm not sure that Microsoft.TeamFoundation.TestManagement.Client.TestSuite.set_State is using this token.
Is any one successful in migrating test plans and test suite with the v15.0.4 of the tool?
Beta Was this translation helpful? Give feedback.
All reactions