Error Fix For "Automation Already Linked To Another Test Case In Test Manager"

When tried to link a Test Case to Test Manager, error thrown is" 21.10.5+Branch.support-v21.10.Sha.xxxxxxxxxxxxxxxxxxxxxxx Automation already linked to another test case in Test Manager.".

Issue Description: When tried to link a Test Case to Test Manager, error thrown is " 21.10.5+Branch.support-v21.10.Sha.xxxxxxxxxxxxxxxxxxxxxxx
Automation already linked to another test case in Test Manager.".

Currently, 4 tenants are present for development, integration, staging and production in the Automation cloud. The test case is already linked to the dev test manager. Now it is desired to run the same test on integration. How to achieve?


Resolution: This is the expected behavior and occurs when the Test Case is already linked to a Test Manager tenant when trying to run the same on another tenant. The scenario is not supported. There are possible alternative solutions:

  • Link the test cases (the xaml) in Studio to several Studio Projects. That way, they can be linked to multiple Test Manager projects

An automated Test Case created in Studio is, from Test Manager perspective, seen as part of a Test Case in Test Manager and therefore cannot be part of another Test Case. This follows the same design as for manual steps, which cannot be part of multiple test cases at the same time.

There is an alternative solution, since not the actual Test Case (the Xaml file) is assigned to a Test Manager test case, it is the link between a Xaml file and a Studio project which gets assigned. So, if using a Studio Test Case in multiple projects, these can be published even to different Orchestrator instances.

Note that there is a limitation on Test Manager and the way both Test Manager and Orchestrator handle Test Case Automation IDs, which should theoretically be in the scope of a tenant, but actually can only have one Automation ID for the entire instance (alpha, staging, cloud), irrespective of tenants.

Unfortunately, if copying and pasting the project it will result in the same test case id. In order to regenerate it, one solution is to convert all the Test Cases to workflows and then back to Test Cases, as this will generate new Automation IDs. There is no other way of doing this at this moment.

Right now, a single Test Case in Studio is supposed to be connected to a single Test Case on Test Manager - this cannot change.

Another alternative would be to use a single Test Manager project and segregate Orchestrator tenants/environments (DEV vs TEST...) via specific labels in Test Manager, so that there would only be a single Test Case in Studio and in Test Manager (as the Test Case does not change) and run it on Orchestrator in different environments. In Test Manager there would be dedicated labels and/or Test Sets for each environment, which allows to tell the different test results.

Important: The supported setup is one Test Manager instance. Within Test Manager, there will be different projects. A developer will automate a Test Case, link it to Test Manager, and then deploy it to any tenant within Orchestrator. Within Test Manager, a tester will simply execute the Test Case and it will run on the Robot that has permissions to run the linked automation. Thus, if the Robot is in the development Orchestrator tenant, it will run in the development Orchestrator tenant.

  • Unlink the automation within the "Automation" tab of the test case or within the Studio project.


image.png

A post was split to a new topic: Example for “Automation Already Linked To Another Test Case In Test Manager” fix