Page 1 of 1

Behaviour of "Find code references" on repository item

Posted: Wed Nov 23, 2016 12:29 pm
by jdk
So, I'm trying to do some cleanup of a testsuite. I know some repository items are no longer needed, but the previous person editing the suite didn't remove them from recordings, only commented out (disabled) the steps where they are used.

Here's a catch-22:

Using the "Cleanup" option for Ranorex repository items doesn't find these items (which I think is correct -- things could get messy if the cleanup option would remove repository items in disabled recording steps).

The option "Find code references" --> "All Code References"... only finds such items in the repository, not in all code where they are used in disabled steps.

That makes it quite hard to do a cleanup. Is there any way to find all code references of a repository item, including use in disabled steps of a recording?

Using Ranorex Studio 6.1.1, by the way. (And I seem to recall vaguely that this used to work just fine on 5.4.6, but I can't be sure, we have put 5.4.6 behind us ;-) )

Any ideas appreciated. For now, I'm going through recordings based on knowledge of the changes made in our application, finding commented out items that I'm sure are not needed anymore, remove the commented out steps, then use the cleanup to see if I have indeed found all recordings that were ehm... using (in disabled mode) the unused items.

Re: Behaviour of "Find code references" on repository item

Posted: Fri Nov 25, 2016 11:17 am
by jma
Hi jdk,

That the cleanup function doesn't remove repository items that are still used in any recording module seems to be correct. Although the corresponding actions are currently disabled, a user could enable those actions at any time, which would lead to compilation errors.

I would suggest searching for the repository item name in the whole solution via the search and replace dialog.
Search and Replace.png
Generally, I would recommend deleting unused steps instead of just disabling them (which should rather be a temporary solution).

Re: Behaviour of "Find code references" on repository item

Posted: Mon Nov 28, 2016 2:59 pm
by jdk
Hi jma, I fully agree with you on both issues, a cleanup should not touch disabled repo items and disabling steps should be a temporary modification; when not needed, removing is the option.

Thanks for your suggestion to use the search & replace for this. Why didn't I think of that...