tosca

Tosca: searching / bulk renaming Test Configuration Parameters


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 (?)


Solution

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