This is a migrated thread and some comments may be shown as answers.

Removing A 'Messed Up' Element From The Repository

1 Answer 104 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
ME
Top achievements
Rank 1
ME asked on 03 Jan 2011, 07:31 AM

 

At times (say, you have not attained perfectness yet - like yours truly), you may have made a mistake and modified the Find Logic of an element beyond repair (Telerik may actually modify your Find Logic at times - not sure why - and the messed up element will no longer be found and an error will persist).

If that happens to you, one of the ways to proceed is:

1.  Remove the element from the repository (Telerik will not let you do this as long as the element is refernced by some test.)

2.  Re-Record the step that involves this element in order to re-introduce the original element into the repository.

3.  Make sure the new element is found properly and is working correctly.

4.  Save that test.

5.  If needed (usually, it will be) copy that step with the newly introduced element to all other tests, if any (you will need to re-add those tests you eliminated from the project first.)

In order to accomplish the first step you have to:

1.  Determine all tests that reference this element.
You do this by changing the find logic of this element, click OK (upon which Telerik will display all tests where this element is referenced).  Write those tests down and cancel out to avoid making the changes.

2.  Eliminate the test(s) referencing this element from the project (but not delete them) - this is a choice on the right-click menu of any selected test script in the project view.

1 Answer, 1 is accepted

Sort by
0
Keaegan
Telerik team
answered on 04 Jan 2011, 05:14 AM
Hi Bey,

For the steps that you are doing, we would definitely advise making a backup of your test before modifying the "find logic" for any element. This way, if you do end up modifying it beyond repair you have a point to restore from. Adding in this ability would have to do the following:

  1. Check for any "normal step" using the element within the test
  2. Delete it
  3. Check for any Coded Step using the element
  4. Delete the code
  5. Check next test in test project for any reference to element and if so, delete until no reference is found for the element.
Continuing on until no reference for the element is found within the test. If this element is used, once, this is not that big a deal, but this would also drastically change some users tests, especially one that uses the same main object/element for most of their page.

We can definitely appreciate wanting to refine your test further, especially using more robust find logic. But we advise that you make a back-up of your project if you will be modifying elements in the repository. This way you can ensure that, even if you make a mistake within the repository that you have a safe point to recover from (re-loading the original project from a known good folder would take much less time than either implementing the above checks or going through the process brought up in this thread on the previous post).

Regarding the issue with "Telerik modifying your find logic", we are not aware of an instance of this, so if you can send us any data you have on how to reproduce this we can begin taking a look at this issue.

However, we have created feature request 103800 to request that an additional menu item be added that shows you different "Links" that an element currently has within the project.  This would make it so, in the event that you need to know what all an element is "Linked" to, you have easy access to make this check. 


Regards,
Keaegan
the Telerik team
Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
Tags
General Discussions
Asked by
ME
Top achievements
Rank 1
Answers by
Keaegan
Telerik team
Share this question
or