jira-azuredevops-migrator icon indicating copy to clipboard operation
jira-azuredevops-migrator copied to clipboard

MIgrating Test Cases with test steps and expected result

Open nipanesanjay opened this issue 5 years ago • 9 comments

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.

nipanesanjay avatar Jan 15 '20 06:01 nipanesanjay

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

MOlausson avatar Jan 18 '20 07:01 MOlausson

Thanks for the updates. We are using Azure DevOps for creating our test cases.

nipanesanjay avatar Jan 20 '20 07:01 nipanesanjay

@nipanesanjay got it. And what extension (if any) are you using in Jira? I assume some 3rd party since the steps doesn't migrate.

MOlausson avatar Jan 20 '20 07:01 MOlausson

In JIRA test cases has been created using Zephyr Test.

nipanesanjay avatar Jan 20 '20 08:01 nipanesanjay

@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.

kmuthukumar-rp avatar Jan 21 '20 17:01 kmuthukumar-rp

@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.

sanjeev40084 avatar Feb 08 '20 22:02 sanjeev40084

This implementation would help me as well, we have similar migration plans.

shyamprasadbandi avatar Apr 21 '20 05:04 shyamprasadbandi

Hi @MOlausson, Do we have any update on this please?

rsikr avatar May 13 '20 21:05 rsikr

@kmuthukumar-rp Hello, please share the full code of JiraItem.cs file where the Zephyr API is used to extract data.

PrashantRanjanTR avatar Aug 27 '21 13:08 PrashantRanjanTR

@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!

pengliangyou avatar Apr 26 '23 06:04 pengliangyou

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: @.***>

Alexander-Hjelm avatar Apr 26 '23 21:04 Alexander-Hjelm

Closing as this feature is now a part of our Jira Migrator PRO offering

Alexander-Hjelm avatar Jan 02 '24 11:01 Alexander-Hjelm