jira-azuredevops-migrator
jira-azuredevops-migrator copied to clipboard
MIgrating Test Cases with test steps and expected result
Hi,
I want to migrate test cases with test steps and expected result.
I did the configuration and migrated test cases but those are getting migrated without test steps.
Please advise.
Hi @nipanesanjay,
This is expected behaviour, currently we only support exporting the built-in Jira issue types. We're looking at options to export 3rd party data as well, what testing tool are you using?
Mathias
Thanks for the updates. We are using Azure DevOps for creating our test cases.
@nipanesanjay got it. And what extension (if any) are you using in Jira? I assume some 3rd party since the steps doesn't migrate.
In JIRA test cases has been created using Zephyr Test.
@MOlausson @nipanesanjay If it helps any, you would need to hit Zephyr API to get the test steps values. Currently the way I had dealt with it is: In JiraItem.ExtractFields(), for teststep issuetype and customfield teststep, download and transform the test steps values into an array of objects by hitting the Zephyr API rest/zapi/latest/teststep/{issueId}.
We might be able to write a mapper to map teststeps, but I couldnt get it to working, so did it this way.
Then save the test step values for each test at the end of ImportCommandLine.ExecuteMigration by maintaining an array of wi.Id's when test item gets created (only once, not for every revision) and then process them at the end.
First get the saved TestCase by,
var testService = Collection.GetService<ITestManagementService>();
var testProject = testService.GetTeamProject(_project);
ITestCase testCase = testProject.TestCases.Find(wiId);
return testCase;
Then AttachSteps and save:
ITestStep step = testCase.CreateTestStep();
step.Title = stepTitle;
step.Description = stepTitle;
step.ExpectedResult = stepElement.Element(Constants.TESTSTEP_RESULT).Value;
testCase.Actions.Add(step);
I am still missing to get teststep attachments which is avl with the API call: /rest/zapi/latest/attachment/{fileid}
. Anyways, I am still not able to complete to do a PR and contribute. But hope this gives a headstart and helps in someway.
@MOlausson we are migrating JIRA project to Azure DevOps currently and some of the JIRA projects have 1000+ tests in Zephyr. If this is implemented in the tool, this will definitely save us lot of time during our migration.
This implementation would help me as well, we have similar migration plans.
Hi @MOlausson, Do we have any update on this please?
@kmuthukumar-rp Hello, please share the full code of JiraItem.cs file where the Zephyr API is used to extract data.
@kmuthukumar-rp Hello, please share the full code of JiraItem.cs file where the Zephyr API is used to extract data.
@PrashantRanjanTR @kmuthukumar-rp hi do you have the code to extract data ? i faced the same issue about steps. Thanks very much!
Zephyr test data is now part of our Pro offering. Let me know if this could be interesting for you and I can send you a quote :)
From: oli @.> Sent: Wednesday, April 26, 2023 8:39:11 AM To: solidify/jira-azuredevops-migrator @.> Cc: Subscribed @.***> Subject: Re: [solidify/jira-azuredevops-migrator] MIgrating Test Cases with test steps and expected result (#172)
@kmuthukumar-rphttps://github.com/kmuthukumar-rp Hello, please share the full code of JiraItem.cs file where the Zephyr API is used to extract data.
@PrashantRanjanTRhttps://github.com/PrashantRanjanTR @kmuthukumar-rphttps://github.com/kmuthukumar-rp hi do you have the code to extract data ? i faced the same issue about steps. Thanks very much!
— Reply to this email directly, view it on GitHubhttps://github.com/solidify/jira-azuredevops-migrator/issues/172#issuecomment-1522866218, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACRQL6DVMC6LN76QMJQI7KLXDC7I7ANCNFSM4KG6U3VA. You are receiving this because you are subscribed to this thread.Message ID: @.***>
Closing as this feature is now a part of our Jira Migrator PRO offering