2

I can't find a way to search for TCPs / search TCP usages / renaming all TCPs.

Let's assume I have a 'licensePlate' TCP set up on the highest level of the hierarchy, and that I have 2 subfolders. In one of them I use the value as it is, in the other folder I change the value. I have some libraries using 'licensePlate'.

I then proceed to rename the TCP to 'carId' on the highest level (and in the libraries). The folder which inherited it will be updated. But the other one will now have two TCPs. This is illustrated in the figure below. enter image description here

So at the moment I need to manually go into all my subfolders/testcases, find all of them where 'licensePlate' was re-configured, and: (1) set the value to the new param ('carId'); (2) delete the old param ('licensePlate').

The logic behind this imho is that I may still be using that param name (e.g. if I resolved my libraries). Still, I'm guessing that there must be a way to bulk-rename or at least to search for TCP usages (?)

PLB
  • 881
  • 7
  • 20

1 Answers1

1

That is really tricky and abstruse. You can find TCP usage with following TQL (Home - Search - TQL Search tab)

=>SUBPARTS[(param_name!="")]

where "param_name" is the name of your parameter.

And it seems that only usages are being found where values has been changed and are not default values.

Psytho
  • 3,313
  • 2
  • 19
  • 27
  • wow this sounds pretty great. I'll have a look into it tomorrow and see if I can accept it :) – PLB Dec 06 '21 at 21:20
  • another question if you know that on the fly: do you happen to know how I could search for the USAGES of TCPs? so for example looking up the string {CP[param]} within a library or folder and ending up on the step which contains it – PLB Dec 07 '21 at 17:08
  • 1
    @PLB i tried to figure it out using TQL but couldn't yet find a solution. – Psytho Dec 10 '21 at 17:31
  • alright thanks. Prolly I should post a dedicated question for that – PLB Dec 11 '21 at 00:46
  • I've opened a new thread for it, with a reference to the documentation which I believe is the correct one, but I cannot make it work... maybe you have an idea? Please check: https://stackoverflow.com/questions/70355892/tosca-searching-for-cps-within-test-step-values – PLB Dec 14 '21 at 21:46