Re: Disable Code Caching (507 Views)
Occasional Contributor
Posts: 5
Registered: ‎03-26-2014
Message 1 of 5 (552 Views)

Disable Code Caching



We are developing code in notepad++ and running it from uft. However we're having issues with uft caching code. So whenever we make some changes to our code and save it, uft is still using the old cached code. We have to either restart uft or reopen the library in the uft code editor in order to recache it.


Is there any way to stop uft from caching the code, and instead always run the code in the files? Alternatively is there a way to force yft to always recache all code at the start of a run?

HP Expert
Posts: 532
Registered: ‎04-12-2012
Message 2 of 5 (507 Views)

Re: Disable Code Caching

Hello Eric,


   Try LoadFunctionLibrary in order to Load the libraries each time test run.


   At the begining of the test load all the libraries needed by code.

   LoadFunctionLibrary "c:/temp/library1.qfl" 

   LoadFunctionLibrary "c:/temp/library2.qfl" 

   LoadFunctionLibrary "c:/temp/librariesneeded.qfl" 




If you find that this or any post resolves your issue, mark it as an accepted solution.

Note: The Opinions expressed in my post are mine alone, and do not reflect the opinions of my employer. No warranties express or implied for any answered posted.

Occasional Visitor
Posts: 1
Registered: ‎09-11-2014
Message 3 of 5 (426 Views)

Re: Disable Code Caching



Unfortunately this doesn't help when libaries are loaded directly from Quality Center. UFT stores the files somewhere in a temp folder and reloads them from there, when the test is started. If I edit the library outsite of UFT (we're using Test Design Studio) and save it to QC, the file won't be downloaded again and my changes won't be visible until I manually reopen the file in UFT.


Additionally I couldn't debug a library loaded via LoadFunctionLibrary, breakpoints inside this lib were ignored. It only worked if I set a breakpoint before calling LoadFunctionLibrary and used Step-Into feature.

Occasional Visitor
Posts: 2
Registered: ‎09-22-2014
Message 4 of 5 (356 Views)

Re: Disable Code Caching



We're experiencing the same problem. We load some libraries with the LoadFunctionLibrary function. When we change code inside these files with notepad and re-run our tests, UFT runs the cached code instead.

The only way to fix it is to restart UFT.

Frequent Advisor
Posts: 46
Registered: ‎06-15-2012
Message 5 of 5 (171 Views)

Re: Disable Code Caching

We are getting this too and using UFT 12.02 patch 1 and QC 12.01.


Made a change to one of the tests yesterday in order to identify a web button. It worked fine and tested it yesterday on machine A.  This morning running the same test, machine A picked up the change but Machine B was still using the previous code, even though both machines had been turned off overnight.


It's very frustrating to say the least.

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.