Dynamically How to associate Usercode (C#) which is stored in QC in UFT API editor?

We would like to develop of couple of common methods in c# and would like to use in UFT API editor. Could you please let me know how to associate c# file into Usercode folder of the API test script dynamically using code.




  • Hi there,

    Currently, there is no built-in option for this. Since C# is compiled language, having a shared .cs code file through multiple tests will be kind of cumbersome because this means that if you want all tests that are using such code, to use the latest version of it, you'll need to recompile all of them.

    In my opinion, it would be easier to build a .dll with all your shared methods/functions and place it in a shared location (or even deploy it into the GAC of each of your client machines) that you can reference from your API tests solutions.



  • Yes that is one of the option I thought. It would be good if we atleast assosicate dll during run time. Is there any option for that without deploying into 50 machines in our environment.