Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
I want to update shared step in my testcase using C# program
Amey Pimpley
21
Reputation points
I want to update shared steps in my testcase using C# program,
I was able to get the shared steps reference with below code, but found that it is not updating the shared steps in tfs.. giving error "The ids and revisions collections must have the same length."
ITestIterationResult iterationResult = GetIterationResult(mCurrentTestCaseID, result);
ITestCase testCase = result.GetTestCase();
if (testCase.Actions[mCurrentSharedStep] is ISharedStepReference sharedStepReference)
{
ISharedStep sharedStep = sharedStepReference.FindSharedStep();
TFSPluginLog.Write(LogType.Info, "UpdateSharedStepResult: " + sharedStep);
foreach (ITestAction action in sharedStep.Actions)
{
if (action is ITestStep subTestStep)
{
//ISharedStepResult sharedStepResult = iterationResult.CreateSharedStepResult(action.Id, subTestStep.Id);
ISharedStepResult sharedStepResult = iterationResult.CreateSharedStepResult(testCase.Actions[mCurrentSharedStep].Id, subTestStep.Id);
sharedStepResult.Comment = comments[index];
Azure App Service
Azure App Service
Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
Sign in to answer