Forum Discussion

A_Roskoshnyi's avatar
A_Roskoshnyi
Contributor
3 years ago
Solved

How to update a script function in all keyword tests?

One of the most common problems I encounter is updating my old functions in Testcomplete. For example:

 

 

Spoiler

function SomeFunction1(A, new_parameter_B)

{
//New part of function
//for compatibility with old things check new_parameter_B
if(new_parameter_B != "" && new_parameter_B != undefined && new_parameter_B != null)
{
//Add something to config
}

//Old functionality
..

}

The problem is that I have 200+ keyword tests that use this script function, but it can only be updated manually (you can surprise me) in each keyword test. Otherwise raise Testcomplete an exception like "Script1 - SomeFunction1 routine expects a different number of parameters".

 

  • Hi A_Roskoshnyi ! As far as I understand,  there is no dedicated feature for this but you can write a custom script that would change the source files of your KDTs.

1 Reply

  • sonya_m's avatar
    sonya_m
    SmartBear Alumni (Retired)

    Hi A_Roskoshnyi ! As far as I understand,  there is no dedicated feature for this but you can write a custom script that would change the source files of your KDTs.