Connecting to the Stream dll in Testpartner can be achieved in two ways:
1) Make a reference to the dll using the Tools>Reference menu ("References - Common_SharedModules" dialog)for the shared module script.
2) Put actual lines of code (using create object method) in the script itself to connect & reference the dll, each time the script is called.
Based on the setup in our project, we initially went with the first method since it sounded easier to reference the DLL into our project. However a major drawback of this method was found, when you try to export Testpartner assets on a machine which is not having the DLL referred to through Tools>Reference menu, then the exported file will also wont have that inclusion. This will result in the script not being able to connect, once you import the exported assets to another machine. Since now the reference to TestPointStreamTestDLL file is not ticked under Tools>Reference menu. This was a major drawback, since at our project, we often connect to assets remotely from our local machine for TestPartner assets that are residing on the regression machine somewhere else. And also we use this specifically to make modifications/updates to our actual repository (production) TestPartner assets.
To avoid this problem in the future, a way was needed to remove the dependancy of refering the DLL in this manner (through TP's References - Common_SharedModules dialog). Hence we decided to use the second method:
Set testpoint = CreateObject("TestPointStreamTestDLL.StreamTest")
at the beginning of each function in TestPartner where the call to the routines of DLL was being made. This would completely make it independent of any changes to the actual TestPartner referencing system (through "References - Common_SharedModules" dialog) and also from any future tool updates.
No comments:
Post a Comment