Ask a Question

How to update a script function in all keyword tests?

SOLVED
A_Roskoshnyi
Community Leader

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
sonya_m
Community Manager

Re: How to update a script function in all keyword tests?

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.


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

1 REPLY 1
sonya_m
Community Manager

Re: How to update a script function in all keyword tests?

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.


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

cancel
Showing results for 
Search instead for 
Did you mean: